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

Using ROS commands over ssh?

asked 2016-03-15 15:20:40 -0500

pgigioli gravatar image

I am trying to launch a node using a launch file on a remote computer from a local machine but I am getting the error: "error launching on [192.168.1.7-0, uri http://ai2:37824/ ]: Name or service not known." I have the ROS_MASTER_URI set to the local machine (the machine attempting to launch the file). I also noticed that when I try ssh'ing into the remote computer and running a ROS command on the same line, it does not work.

For example:

ssh ai2@192.168.1.7 
rostopic list // works

ssh ai2@192.168.1.7 ls // works

ssh ai2@192.168.1.7 rostopic list // does not work

It seems that something about ssh'ing and executing a ROS command on the same line does not work and I think this problem is related to the problem I am having with the launch file. Has anyone ever dealt with this issue?

edit retag flag offensive close merge delete

Comments

What exactly are you trying to do? Are you trying to run rostopic list on your own computer after SSHing? Or are you trying to SSH then run rostopic list on the computer you SSHed into?

alee gravatar image alee  ( 2016-03-15 16:00:01 -0500 )edit

I am trying to run rostopic list on the same line as ssh. For whatever reason, if I ssh into the remote and then run rostopic list separately, there are no errors. But if I ssh and rostopic list on the same line, I get "bash: rostopic: command not found"

pgigioli gravatar image pgigioli  ( 2016-03-15 16:12:31 -0500 )edit

1 Answer

Sort by » oldest newest most voted
6

answered 2016-03-15 18:10:43 -0500

John Hoare gravatar image

When you are attempting to run ssh ai2@192.168.1.7 rostopic list you are attempting to run it on a non-interactive shell.

I believe the issue you are having is described here: http://stackoverflow.com/questions/94...

From the answer there, make sure your source /path/to/setup.bash is before the following lines in your .bashrc:

# If not running interactively, don't do anything
[ -z "$PS1" ] && return
edit flag offensive delete link more

Comments

Thanks! This is exactly what I needed.

pgigioli gravatar image pgigioli  ( 2016-03-16 10:55:21 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-03-15 15:20:40 -0500

Seen: 5,264 times

Last updated: Mar 15 '16