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

ROS 2ノード自動起動がうまくいかない問題に対する修正 #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions service/ros2_launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
SCRIPTDIR=/home/pi/service/
ENVFILE=/home/pi/ros2_ws/install/local_setup.bash

sudo /usr/sbin/ip link set lo multicast on
echo "Loading ROS2 Env..."
source /opt/ros/humble/setup.bash
source ${ENVFILE}
Expand Down
3 changes: 2 additions & 1 deletion service/scramble_auto_robot_ros2.service
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[Unit]
Description=ROS2 launch
After=local-fs.target
After=local-fs.target network-online.target
ConditionPathExists=/home/pi/service

[Service]
ExecStartPre=/bin/sleep 5
ExecStart=/home/pi/service/ros2_launch.sh
ExecStop=/bin/kill ${MAINPID}
Restart=on-failure
Expand Down