ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

running several nodes in different machines using bash or python script

asked 2015-02-10 07:18:54 -0500

RSA_kustar gravatar image

updated 2016-03-10 12:58:22 -0500

130s gravatar image

I want to use multiple machines to run several nodes. The idea is to use ssh from several terminals. I am workingon running these nodes using a python scipt using sshpass command. I am aware of the security issues but all machines are mine. before i run the command in a python script or in a pash file I run it in the command line and it didnt work:

I wrote the folllwoing in the command line:

sshpass -p 'password' ssh user@host rosrun package_name node_name

but it didnt work... The error was :

bash: rosrun: command not found

What should I do ?

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
6

answered 2015-02-10 07:21:55 -0500

BennyRe gravatar image

Stuff like this is usually solved with the machine tag in a launch file.

edit flag offensive delete link more
0

answered 2016-02-04 18:51:44 -0500

Will Chamberlain gravatar image
edit flag offensive delete link more
0

answered 2016-03-10 12:56:57 -0500

130s gravatar image

updated 2016-03-10 13:02:39 -0500

Other than using the ROS' dedicated feature like machine tag as @BennyRe suggests, I guess you better check if the environment variables are loaded properly on the shell on the remote host; the error message says the rosrun command isn't found, which is kind of common issue even on local hosts. You can still utilize sshpass for diagnose purpose like:

sshpass -p 'password' ssh user@host env|grep ROS
edit flag offensive delete link more
0

answered 2016-03-10 03:38:04 -0500

It looks as though ros is not fully installed on the machine you're ssh'ing into. It's probably easiest if you ssh in manually using a terminal and the same username and password. Then try the rosrun command from the terminal. If it still doesn't work then you know that it's the ros installation which is the problem

BennyRe is right you can achieve what you're aiming for using a ros launch file with a machine tag in it. This would be a neater and more 'ROS approved' way of doing thing. Although by the looks of it that won't solve this particular problem you're having.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-02-10 07:18:54 -0500

Seen: 1,007 times

Last updated: Mar 10 '16