0

I have a script (baxter.sh) that I use to connect to a Baxter robot (then I am able to use ros command on the robot)

Some demo of the robot need 3 to 4 command to be launched.

When I try to make a bash script it doesn't work as intended, it get stuck at the ./baxter.sh part, only processing the next command after the baxter.sh script is stopped (the baxter.sh open a new shell that allow command to be sent to the robot I think)

How can I do it so it would directly launch the other command in the shell that appeared with the use of ./baxter.sh ?

./baxter.sh
rosrun baxter_behaviour_arms baxter_astro_control_with_sound.py

This is how it look like when I do it by hand

2
  • Are the other commands actually bash shell commands, or are they commands that must be input to some kind of command processor on the robot? If the latter, then you probably need something like an expect script Jan 26, 2018 at 13:55
  • Sorry for the late answer. The script seem to open a RSDK shell (this link give more information on the script) which allow communication with the robot. The command I'm launching are normal command (ROS command that come from the differents ros package you can find on ubuntu repository). Feb 7, 2018 at 10:04

1 Answer 1

0

If you login to a remote machine without password (using ssh keys) you can do the following trick ssh user@remoteMachine 'bash -s' < local_script.sh

Additional possible variants can be found in this topic

1
  • Thanks for your help but I don't think this would work. The script open a new shell (RSDK shell) that allow me to send ROS command (coming from ROS package on ubuntu repository) to the robot. I am not opening SSH connection like that (the script isn't either). Though I'm gonna keep your solution for when I want to execute script on a remote machine. Thanks. Feb 7, 2018 at 10:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .