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

<machine> in launch file does not work?

asked 2016-03-15 12:05:20 -0500

pgigioli gravatar image

updated 2016-03-15 12:06:23 -0500

I'm trying to launch the turtlebot_rviz_navigation from a launch file using the machine tag. The launch file exists on the robot and rviz will be run on a remote computer. Both have ROS installed and both can ssh into the other without any problems.
Here is my definition of the machine and the node:

<machine name="comp" address="comp@192.168.1.11" user="comp" env-loader="/opt/ros/indigo/env.sh" />
          <node machine="comp" name="view_navigation" pkg="turtlebot_rviz_launchers" type="view_navigation.launch" output="screen" launch-prefix="xterm -e" />

/opt/ros/indigo/env.sh in the remote computer has the contents:

#!/usr/bin/env sh
. /opt/ros/indigo/setup.sh
exec "$@"

When I run the launch file I get the error: "cannot resolve host address for machine [ comp@192.168.1.11 The traceback for the exception was written to the log file"

Any ideas?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-03-15 12:06:19 -0500

alee gravatar image

Address should just be your IP address, no need for the username.

edit flag offensive delete link more

Comments

I get the error: remote[192.168.1.11-0]: failed to launch on comp: 192.168.1.11 is not in your SSH known_hosts file. Please manually: ssh comp@192.168.1.11 then try roslaunching again.

pgigioli gravatar image pgigioli  ( 2016-03-15 12:08:23 -0500 )edit

Do as the error message says. After you ssh in the first time, it'll get added to your .ssh/known_hosts file. You can also manually add it yourself.

alee gravatar image alee  ( 2016-03-15 12:09:51 -0500 )edit

I ssh'ed into comp@192.168.1.11 then exited and relaunched and got the same error. I have ssh'ed into my remote computer before. How do I manually add the IP to the known hosts file? "nano ~/.ssh/known_hosts" shows two illegible lines.

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

Okay, I successfully added the address to my known_hosts file but now I get the error "error launching on [192.168.1.11-0, uri http://comp:57183/ ]: Name or service not known" for the node that I am trying to run through the ssh.

pgigioli gravatar image pgigioli  ( 2016-03-15 12:51:37 -0500 )edit

Hm. That doesn't seem right. It should look like ["username"-0, uri http://"ip":11311/]. Are you sure you put everything in the right order?

alee gravatar image alee  ( 2016-03-15 13:37:49 -0500 )edit

Ah, I was trying to launch a launch file as a node instead of as an include. However, now I am getting the problem that I can't launch a launch file from a remote computer. The include argument only looks for files locally. Is there anyway to include a file from a remote computer?

pgigioli gravatar image pgigioli  ( 2016-03-15 14:22:09 -0500 )edit

I don't think so. However, you can launch nodes on a remote computer so you can launch a file locally that launches remote nodes. An example would be here: https://github.com/PR2/pr2_robot/blob...

alee gravatar image alee  ( 2016-03-15 15:58:53 -0500 )edit

I tried to create a similar workaround by writing a .py node on the remote computer that will execute the desired file. Then I try to launch that .py node from the launch file using the <node> declaration include the machine tag but I get the "Name or service not known" error

pgigioli gravatar image pgigioli  ( 2016-03-15 16:18:26 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-03-15 12:05:20 -0500

Seen: 1,079 times

Last updated: Mar 15 '16