Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jsk_fetch_startup] fix escape evaluation in install_upstart.sh #1204

Closed
wants to merge 6 commits into from

Conversation

knorth55
Copy link
Member

now variables starts with $ is evaluated and replace by empty.
I fix the problems

@knorth55
Copy link
Member Author

/etc/ros/indigo/jsk-fetch-startup.conf looks correct

description "spawn jsk bringup nodes for fetch"
# use default log dir: yamaguchi & s-kitagawa (2019/04/18)
# env ROS_LOG_DIR=/var/log/ros

start on roscore_is_up
stop on roscore_is_down

respawn

# add ROSCONSOLE_FORMAT: s-kitagawa (2019/10/03)
env AUDIO_DEVICE="alsa_output.usb-1130_USB_AUDIO-00-AUDIO.analog-stereo"
env ROSCONSOLE_FORMAT="[${severity}] [${time}] [${node}:${logger}]: ${message}"

# enable usb speaker if available
pre-start script
    # launch by fetch user: yamaguchi & s-kitagawa (2019/04/18)
    # exec su ros -c "pactl set-default-sink $AUDIO_DEVICE || true"
    exec su fetch -c "pactl set-default-sink $AUDIO_DEVICE || true"
end script

script
    # launch by fetch user: yamaguchi & s-kitagawa (2019/04/18)
    # exec su ros -c ". /home/fetch/ros/indigo/devel/setup.bash && roslaunch /home/fetch/ros/indigo/src/jsk-ros-pkg/jsk_robot/jsk_fetch_robot/jsk_fetch_startup/launch/fetch_bringup.launch boot_sound:=true"
    exec su fetch -c ". /home/fetch/ros/indigo/devel/setup.bash && roslaunch /home/fetch/ros/indigo/src/jsk-ros-pkg/jsk_robot/jsk_fetch_robot/jsk_fetch_startup/launch/fetch_bringup.launch boot_sound:=true"
end script

Copy link
Member

@708yamaguchi 708yamaguchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I finally understand these scripts.
This system is a little complicated for shell beginners like me, because there are two shell evaluations before fetch's bringup (install_upstart.sh -> jsk-fetch-startup.conf -> fetch_bringup.launch).

FYI
jsk-fetch-startup.conf of previous version:

description "spawn jsk bringup nodes for fetch"
# use default log dir: yamaguchi & s-kitagawa (2019/04/18)
# env ROS_LOG_DIR=/var/log/ros

start on roscore_is_up
stop on roscore_is_down

respawn

# add ROSCONSOLE_FORMAT: s-kitagawa (2019/10/03)
env AUDIO_DEVICE=alsa_output.usb-1130_USB_AUDIO-00-AUDIO.analog-stereo
env ROSCONSOLE_FORMAT='[] [] [:]: '

# enable usb speaker if available
pre-start script
    # launch by fetch user: yamaguchi & s-kitagawa (2019/04/18)
    # exec su ros -c 'pactl set-default-sink  || true'
    exec su fetch -c 'pactl set-default-sink  || true'
end script

script
    # launch by fetch user: yamaguchi & s-kitagawa (2019/04/18)
    # exec su ros -c ". /home/leus/ros/melodic/devel/setup.bash && roslaunch /home/leus/ros/melodic/src/jsk_robot/jsk_fetch_robot/jsk_fetch_startup/launch/fetch_bringup.launch boot_sound:=true"
    exec su fetch -c ". /home/leus/ros/melodic/devel/setup.bash && roslaunch /home/leus/ros/melodic/src/jsk_robot/jsk_fetch_robot/jsk_fetch_startup/launch/fetch_bringup.launch boot_sound:=true"
end script

@knorth55 knorth55 mentioned this pull request Feb 23, 2020
29 tasks
@knorth55
Copy link
Member Author

knorth55 commented May 8, 2020

@k-okada could you review and merge this PR?

@knorth55 knorth55 added this to the 1.1.1 milestone Oct 21, 2020
@knorth55
Copy link
Member Author

this PR is moved to #1208

@knorth55 knorth55 closed this Nov 26, 2020
@knorth55 knorth55 deleted the fix-install-upstart branch January 15, 2021 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants