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

My first URDF for a Scara Arm shows in rViz but not Gazebo.

asked 2018-09-09 16:40:53 -0500

lukewd gravatar image

updated 2018-09-10 01:29:25 -0500

gvdhoorn gravatar image

Hi, thanks so much in advance for your guidance. I am new to ROS but have gotten through the Turtlebot 2 tutorials with a Create 2 Turtlebot I built and am now trying to create a URDF for a Scara arm I bought off aliexpress:

image description

Going through the URDF_SIM_TUTORIAL, I have gotten the robot defined well enough to show up in rViz with working joints but not gazebo. I'm assuming some problem with my using inertia values that are likely incorrect may be the problem but I cannot make sense of the output. Grateful for any advice.

Also, if there happens to be a URDF I do not know about I could use with or modify for this robot, please let me know. I'm not wanting to reinvent the wheel but could not figure out a faster path to using this robot with ROS.

ROS Version: Kinetic
OS: Ubuntu 16.04
Env Variables:
ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_PACKAGE_PATH=/home/luke/catkin_scara/src:/opt/ros/kinetic/share
ROS_MASTER_URI=http://localhost:11311
ROS_VERSION=1
SESSION_MANAGER=local/ROS-VirtualBox:@/tmp/.ICE-unix/2152,unix/ROS-VirtualBox:/tmp/.ICE-unix/2152
ROSLISP_PACKAGE_DIRECTORIES=/home/luke/catkin_scara/devel/share/common-lisp
ROS_DISTRO=kinetic
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros

rViz command (shows robot with functioning joints)

roslaunch urdf_tutorial display.launch model:=urdf/scara_52900.urdf.xacro

Output from Terminal:

luke@ROS-VirtualBox:~/catkin_scara/src/scara_52900$ roslaunch urdf_tutorial display.launch model:=urdf/scara_52900.urdf.xacro
... logging to /home/luke/.ros/log/4dbcddac-b477-11e8-bd08-080027cb2f61/roslaunch-ROS-VirtualBox-7983.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

xacro: Traditional processing is deprecated. Switch to --inorder processing!
To check for compatibility of your document, use option --check-order.
For more infos, see http://wiki.ros.org/xacro#Processing_Order
xacro.py is deprecated; please use xacro instead
started roslaunch server http://ROS-VirtualBox:34957/

SUMMARY
========

PARAMETERS
 * /robot_description: <?xml version="1....
 * /rosdistro: kinetic
 * /rosversion: 1.12.13
 * /use_gui: True

NODES
  /
    joint_state_publisher (joint_state_publisher/joint_state_publisher)
    robot_state_publisher (robot_state_publisher/state_publisher)
    rviz (rviz/rviz)

auto-starting new master
process[master]: started with pid [7996]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 4dbcddac-b477-11e8-bd08-080027cb2f61
process[rosout-1]: started with pid [8009]
started core service [/rosout]
process[joint_state_publisher-2]: started with pid [8012]
process[robot_state_publisher-3]: started with pid [8021]
process[rviz-4]: started with pid [8028]
^C[rviz-4] killing on exit
[robot_state_publisher-3] killing on exit
[joint_state_publisher-2] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
luke@ROS-VirtualBox:~/catkin_scara/src/scara_52900$ roslaunch scara_52900  gazebo.launch
... logging to /home/luke/.ros/log/56e6e1c0-b477-11e8-bd08-080027cb2f61/roslaunch-ROS-VirtualBox-8166.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

Gazebo launch command (launches gazebo but shows no robot):

roslaunch scara_52900 gazebo.launch

Terminal:

xacro: Traditional processing is deprecated. Switch to --inorder processing!
To check for compatibility of your document, use option --check-order.
For more infos, see http://wiki.ros.org/xacro#Processing_Order
xacro.py is deprecated; please use ...
(more)
edit retag flag offensive close merge delete

Comments

You'll have to check whether it is still the case, but earlier versions of Gazebo required a dynamics element to be present in every joint declaration in your URDF or things wouldn't work.

gvdhoorn gravatar image gvdhoorn  ( 2018-09-10 01:33:23 -0500 )edit

Thanks for your help. I added in joint dynamic tag and was able to run the gazebo.launch but the robot still did not show up. My latest attempt is on github https://github.com/lukewebdev/SCARA-5... in case that helps clearly see the urdf etc.

lukewd gravatar image lukewd  ( 2018-09-10 10:16:40 -0500 )edit

I should add, I have not done much with gazebo so it is possible my URDF is fine and I just do not know how to get it to show in Gazebo.

lukewd gravatar image lukewd  ( 2018-09-10 11:34:26 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2018-09-10 12:02:14 -0500

lukewd gravatar image

The reason my URDF was not showing (in addition to missing dynamics tag) was my <inertia> tags were not inside an <intertial> tag and there were no <mass> tags. Having fixed the robot now appears! Unfortunately it is showing up on its side like it died but I will tweak that and post another question as it seems to be a separate issue. Thanks again!

edit flag offensive delete link more

Comments

I had a similar issue where I had not defined any inertia for some fixed links (interestingly, I did not need to add it to all of them, just some...). I don't have any dynamics but this does not seem to be a problem anymore.

Felix Widmaier gravatar image Felix Widmaier  ( 2019-12-02 09:46:24 -0500 )edit

Question Tools

Stats

Asked: 2018-09-09 16:40:53 -0500

Seen: 1,223 times

Last updated: Sep 10 '18