Relative Content

Tag Archive for gosshrosros2

Trouble running ROS2 launch files from a non-interactive SSH command

I am writing a program that is supposed to remotely run ROS2 launch files on a connected robot via SSH. I am using Golang to connect to the robot via SSH and run ROS2 commands. So far this setup has worked, I have been able to run ROS2 commands such as
ros2 topic list and ros2 topic info, and they have returned the expected output. When I try to run a ros2 launch file however, no output is returned, and running commands on the robot to try and detect if the node is running (ros2 node list) show that the launched nodes are not running.
My code for executing SSH commands via go is: