0
$\begingroup$

Rosanswers logo

Going through a PacktPub book's tutorial on ROS, Effective Robotics Programming with ROS. I'm hoping the community has solutions.

In Chapter 4, I tried running

roslaunch robot1_description display.launch model:="'rospack find robot1_description'/urdf/robot1.urdf"

and managed to get the rviz window up and running, However, there were no robots as described in the .urdf file in the display.launch file.

I have edited the last line as suggested in #q113561, but to no avail.


Originally posted by Alsing on ROS Answers with karma: 27 on 2017-10-26

Post score: 0


Original comments

Comment by gvdhoorn on 2017-10-26:
Can you please tell us which OS this is, which version, how you installed it, how you installed ROS, and which version of ROS this is?

I've seen similar questions about RViz on certain Ubuntu versions not rendering correctly.

And for the future: please include that sort of information.

Comment by Alsing on 2017-10-27:
I am on VMWare Fusion 10.0.1, Ubuntu 16.04, ROS Kinetic.

Installed ROS on the ROS Kinetic Installation page.

Comment by gvdhoorn on 2017-10-27:
Btw: can you add a screenshot showing the RViz window, and add the console output you get after running the roslaunch robot1_description .. command?

Comment by gvdhoorn on 2017-10-27:
I've changed the title to better reflect the problem, and I've updated the formatting of your question a bit.

Comment by Alsing on 2017-10-27:
Console output:

PARAMETERS

  • /robot_description: <?xml version="1....

  • /rosdistro: kinetic

  • /rosversion: 1.12.7

  • /use_gui: False

Continued after due to comment length limit

Comment by Alsing on 2017-10-27:
NODES /

joint_state_publisher (joint_state_publisher/joint_state_publisher)

robot_state_publisher (robot_state_publisher/state_publisher)

rviz (rviz/rviz)

Comment by Alsing on 2017-10-27:
ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found

process[joint_state_publisher-1]: started with pid [53550]

process[robot_state_publisher-2]: started with pid [53551]

process[rviz-3]: started with pid [53552]

How do I add a screenshot?

Comment by gvdhoorn on 2017-10-28:
Please edit your question, do not use comments. They are too limited and are not meant for this.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

roslaunch robot1_description display.launch model:="'rospack find robot1_description'/urdf/robot1.urdf"

Is this an actual copy-paste?

I ask because the rospack find robot1_description bit should be between backticks (`), not single quotes.

rospack find .. is a command that bash needs to execute before it lets roslaunch do its thing.

If you don't use backticks, but single quotes, your shell will not execute it and roslaunch is given the following string for the model argument:

'rospack find robot1_description'/urdf/robot1.urdf

which is obviously not correct.


Originally posted by gvdhoorn with karma: 86574 on 2017-10-27

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Alsing on 2017-10-27:
Yea, I found it odd! It is a direct copy and paste but it might have been an error by the author (not the first). However, I did just cd into the path and did roslaunch robot1_description display.launch model:=./robot1.urdf

Comment by gvdhoorn on 2017-10-28:
Try to use absolute paths. Relative paths will not work the way you expect them to. If:

roslaunch robot1_description display.launch model:="`rospack find robot1_description`/urdf/robot1.urdf"

works then I'm pretty sure there's nothing wrong with your setup.

Comment by gvdhoorn on 2017-11-04:
Did you get this to work?

Comment by Alsing on 2017-11-06:
Yes, I believe it is the VMWare issue.

Comment by gvdhoorn on 2017-11-06:
Are you sure? The backticks vs single quotes did not influence the outcome at all?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.