Ask Your Question
1

ROS2 run bash script

asked 2020-12-08 08:02:32 -0500

alexisthethe gravatar image

I would like to run a bash script as a node liek the following:

ros2 run package script.sh

I know this is possible in ROS1, however I cannot find the right way to do it in ROS2.

Do you have any idea ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-12-18 13:33:01 -0500

jacobperron gravatar image

ros2 run currently looks in the install subdirectory lib/${PROJECT_NAME}. So, it should work if you install your bash script to that location, for example:

install(
  PROGRAMS script.sh
  DESTINATION lib/${PROJECT_NAME})
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2020-12-08 08:02:32 -0500

Seen: 120 times

Last updated: Dec 18 '20