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

Second Rviz instance doesn't show robot model from ROS master

asked 2017-09-08 17:01:17 -0500

matl gravatar image

updated 2017-09-14 10:44:39 -0500

jayess gravatar image

Dear all,

I am running a ROS master on a first PC with a Universal Robot in it. In a second PC I'd just like to see the visualization with Rviz. After exporting the IP address of the master using

export ROS_MASTER_URI=myipadress

The second PC connects to the first one, but I am having trouble to see the robot in the second PC. After adding the robot model in second PC I just get errors in the robot model. It is just shown in a weird position and is coloured white. Link to screenshot image description

Sorry for the screenshot picture with my phone, but the PC is right now not connected to the internet anymore, so I couldn't post from there. Image upload native here in ROS answers is not yet available for me. Sorry again.

Did I forget an important step before connectiong or what went wrong here?

Edit/Update:

ROSLISP_PACKAGE_DIRECTORIES=""   
ROS_DISTRO="indigo"   
ROS_ETC_DIR="/opt/ros/indigo/etc/ros"   
ROS_MASTER_URI="160.69.69.100"   
ROS_PACKAGE_PATH="/opt/ros/indigo/share:/opt/ros/indigo/stacks"   
ROS_ROOT="/opt/ros/indigo/share/ros"
edit retag flag offensive close merge delete

Comments

@matl: please attach the screenshot to your question directly. I've given you enough karma for that.

gvdhoorn gravatar image gvdhoorn  ( 2017-09-09 04:00:54 -0500 )edit

Please update your question with the values of ROS_IP, ROS_HOSTNAME and ROS_MASTER_URI for each of the involved computers. A simple diagram showing your network layout and configuration would also help.

Most likely you don't have a working DNS, and should set ROS_IP on all hosts.

gvdhoorn gravatar image gvdhoorn  ( 2017-09-09 04:01:50 -0500 )edit

Without the other requested information we cannot help you.

gvdhoorn gravatar image gvdhoorn  ( 2017-09-10 02:17:10 -0500 )edit

My best guess is that the second machine does not know where to look for the models of the robot you are trying to load.

On the second PC do you have the Universal Robot package installed or are you using it from source?

Marq gravatar image Marq  ( 2017-09-11 10:08:55 -0500 )edit

The second machine can't subscribe to the /tf topic properly, that is most likely the problem. The 'white' meshes and 'bunched up' view are typical symptoms of that. that's why there is a request for the ROS_IP, ROS_HOSTNAME and ROS_MASTER_URI on all involved hosts.

gvdhoorn gravatar image gvdhoorn  ( 2017-09-11 10:10:20 -0500 )edit

I updated the values above

matl gravatar image matl  ( 2017-09-14 05:40:07 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-09-14 10:42:56 -0500

jayess gravatar image

updated 2017-09-14 11:32:44 -0500

Like @gvdhoorn said in the comments to your question, your second machine can't find the transforms. You have set ROS_MASTER_URI incorrectly. If you look at the ROS Network Setup page on the wiki, you'll see that ROS_MASTER_URI needs to include the port number and you should set your ROS_HOSTNAME environment variable too:

$ export ROS_HOSTNAME=localhost
$ export ROS_MASTER_URI=http://localhost:11311

You should set these along with ROS_IP on each machine that you're using. ROS_IP should be set to the IP of the machine itself.

Now, the value of localhost means that everything will only be run locally so you should change that to be your master's IP address. It would look like

$ export ROS_MASTER_URI=http://160.69.69.100:11311

Use ROS_HOSTNAME if you're using a hostname

$ export ROS_HOSTNAME=<your-hostname>

or ROS_IP if you're using an IP address

$ export ROS_IP=<your-ip>

Where <your-hostname> and <your-ip> is your machine's hostname and IP address, respectively.

Check out the environment variables page on the wiki for more information.

edit flag offensive delete link more

Comments

Hey, I tried it again, but anyways I get the same error:

declare -x ROSLISP_PACKAGE_DIRECTORIES=""
declare -x ROS_DISTRO="indigo"
declare -x ROS_ETC_DIR="/opt/ros/indigo/etc/ros"
declare -x ROS_HOSTNAME="160.69.69.100"
declare -x ROS_IP="160.69.69.102"

matl gravatar image matl  ( 2017-09-14 11:06:54 -0500 )edit

declare -x ROS_MASTER_URI="http://160.69.69.100:11311"
declare -x ROS_PACKAGE_PATH="/opt/ros/indigo/share:/opt/ros/indigo/stacks"
declare -x ROS_ROOT="/opt/ros/indigo/share/ros"

matl gravatar image matl  ( 2017-09-14 11:07:31 -0500 )edit

Do you have any ideas, what else I could try or what I have to change?

matl gravatar image matl  ( 2017-10-14 08:03:01 -0500 )edit
1

Your Fixed Frame is set to map. Does that frame exist? If not, change it to a frame that does exist.

gvdhoorn gravatar image gvdhoorn  ( 2017-10-14 08:49:24 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2017-09-08 17:01:17 -0500

Seen: 736 times

Last updated: Sep 14 '17