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:
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 xacro instead
started roslaunch server http://ROS-VirtualBox:38631/
SUMMARY
========
PARAMETERS
* /robot_description: <?xml version="1....
* /robot_state_publisher/publish_frequency: 30.0
* /rosdistro: kinetic
* /rosversion: 1.12.13
* /use_sim_time: True
NODES
/
gazebo (gazebo_ros/debug)
gazebo_gui (gazebo_ros/gzclient)
robot_state_publisher (robot_state_publisher/robot_state_publisher)
urdf_spawner (gazebo_ros/spawn_model)
auto-starting new master
process[master]: started with pid [8179]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to 56e6e1c0-b477-11e8-bd08-080027cb2f61
process[rosout-1]: started with pid [8192]
started core service [/rosout]
process[gazebo-2]: started with pid [8196]
/opt/ros/kinetic/lib/gazebo_ros/debug: 5: [: Linux: unexpected operator
process[gazebo_gui-3]: started with pid [8214]
process[urdf_spawner-4]: started with pid [8225]
process[robot_state_publisher-5]: started with pid [8226]
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gzserver...done.
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[ INFO] [1536528531.612243578]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1536528531.614013244]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
SpawnModel script started
[INFO] [1536528532.520455, 0.000000]: Loading model XML from ros parameter
[INFO] [1536528532.522322, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[New Thread 0x7fffce85d700 (LWP 8360)]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[New Thread 0x7fffca598700 (LWP 8363)]
[New Thread 0x7fffc9d97700 (LWP 8364)]
[New Thread 0x7fffc9596700 (LWP 8367)]
[New Thread 0x7fffc8d95700 (LWP 8368)]
[New Thread 0x7fffc3fff700 (LWP 8369)]
[New Thread 0x7fffc37fe700 (LWP 8381)]
[New Thread 0x7fffc2ffd700 (LWP 8382)]
[New Thread 0x7fffc27fc700 (LWP 8383)]
[New Thread 0x7fffc1ffb700 (LWP 8384)]
[ INFO] [1536528538.740126906]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1536528538.741867300]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[New Thread 0x7fffc17fa700 (LWP 8386)]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[New Thread 0x7fff9ddfb700 (LWP 8389)]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[New Thread 0x7fff9cfbc700 (LWP 8394)]
[New Thread 0x7fff9cbbb700 (LWP 8444)]
[New Thread 0x7fff9c3ba700 (LWP 8445)]
[New Thread 0x7fff9bbb9700 (LWP 8446)]
[New Thread 0x7fff9b3b8700 (LWP 8447)]
[INFO] [1536528540.192345, 0.002000]: Calling service /gazebo/spawn_urdf_model
[INFO] [1536528540.373162, 0.008000]: Spawn status: SpawnModel: Successfully spawned entity
[ INFO] [1536528540.430710702, 0.022000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1536528540.618218704, 0.093000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
Unhandled exception in thread started by
sys.excepthook is missing
lost sys.stderr
[urdf_spawner-4] process has finished cleanly
log file: /home/luke/.ros/log/56e6e1c0-b477-11e8-bd08-080027cb2f61/urdf_spawner-4*.log
[ INFO] [1536528540.915255199, 0.395000000]: Physics dynamic reconfigure ready.
[Thread 0x7fffc1ffb700 (LWP 8384) exited]
[ INFO] [1536528541.123592508, 0.571000000]: Physics dynamic reconfigure ready.
gazebo.launch:
<launch>
<arg name="paused" default="false"/>
<arg name="use_sim_time" default="true"/>
<arg name="gui" default="true"/>
<arg name="headless" default="false"/>
<arg name="debug" default="true"/>
<arg name="model" default="$(find scara_52900)/urdf/scara_52900.urdf.xacro"/>
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="debug" value="$(arg debug)" />
<arg name="gui" value="$(arg gui)" />
<arg name="paused" value="$(arg paused)"/>
<arg name="use_sim_time" value="$(arg use_sim_time)"/>
<arg name="headless" value="$(arg headless)"/>
</include>
<param name="robot_description" command="$(find xacro)/xacro.py $(arg model)" />
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model"
args="-z 1.0 -unpause -urdf -model robot -param robot_description" respawn="false" output="screen" />
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">
<param name="publish_frequency" type="double" value="30.0" />
</node>
</launch>
scara_52900.urdf.xacro:
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="scara_52900">
<material name="blue">
<color rgba="0 0 .8 .9"/>
</material>
<material name="pvc">
<color rgba=".8 .8 .8 1"/>
</material>
<material name="black">
<color rgba="0 0 0 1"/>
</material>
<material name="aluminum">
<color rgba=".144 .144 .144 .8"/>
</material>
<material name="white">
<color rgba="1 1 1 1"/>
</material>
<material name="red">
<color rgba="0.8 0 0 1"/>
</material>
<material name="green">
<color rgba="0 1 0 1"/>
</material>
<material name="yellow">
<color rgba="1 1 0 1"/>
</material>
<link name="base_link">
<visual>
<geometry>
<box size=".139 .195 .009"/>
</geometry>
<material name="pvc"/>
</visual>
<collision>
<geometry>
<box size=".139 .195 .009"/>
</geometry>
</collision>
<inertia ixx="0.4" ixy="0.0" ixz="0.0" iyy="0.4" iyz="0.0" izz="0.2"/>
</link>
<link name="scapula">
<visual>
<geometry>
<box size=".155 .134 .320"/>
</geometry>
<origin rpy="0 0 0" xyz="0 -.065 .075"/>
<material name="pvc"/>
</visual>
<collision>
<geometry>
<box size=".155 .134 .320"/>
</geometry>
</collision>
<inertia ixx="0.4" ixy="0.0" ixz="0.0" iyy="0.4" iyz="0.0" izz="0.2"/>
</link>
<joint name="waist" type="revolute">
<parent link="base_link"/>
<child link="scapula"/>
<axis xyz="0 0 1" />
<origin xyz="0 0 .09"/>
<limit lower="-3" upper="3" effort="1" velocity="1" />
<visual>
<material name="aluminum"/>
</visual>
</joint>
<link name="humerus">
<visual>
<geometry>
<box size=".255 .059 .056"/>
</geometry>
<origin rpy="0 0 1.57057" xyz="0 .110 0"/>
<material name="pvc"/>
</visual>
<collision>
<geometry>
<box size=".255 .059 .056"/>
</geometry>
</collision>
<inertia ixx="0.4" ixy="0.0" ixz="0.0" iyy="0.4" iyz="0.0" izz="0.2"/>
</link>
<joint name="shoulder" type="prismatic">
<parent link="scapula"/>
<child link="humerus"/>
<axis xyz="0 0 1" />
<origin xyz="0 0 .04" rpy="0 0 0" />
<limit lower="0" upper=".155" effort="1" velocity="1"/>
</joint>
<link name="forearm">
<visual>
<geometry>
<box size=".205 .06 .072"/>
</geometry>
<origin xyz="0 .100 0" rpy="0 0 1.57057" />
<material name="blue"/>
</visual>
<collision>
<geometry>
<box size=".205 .06 .072"/>
</geometry>
</collision>
<inertia ixx="0.4" ixy="0.0" ixz="0.0" iyy="0.4" iyz="0.0" izz="0.2"/>
</link>
<joint name="elbow" type="revolute">
<parent link="humerus"/>
<child link="forearm"/>
<limit lower="-2.44" upper="2.44" effort="1" velocity="1"/>
<origin xyz="0 .190 -.065" rpy="0 0 0" />
<axis xyz="0 0 1" />
</joint>
<link name="hand">
<visual>
<geometry>
<box size=".03 .129 .009"/>
</geometry>
<origin xyz="0 0 0 " rpy="1.57057 0 0"/>
<material name="red"/>
</visual>
<collision>
<geometry>
<box size=".03 .129 .009"/>
</geometry>
</collision>
<inertia ixx="0.4" ixy="0.0" ixz="0.0" iyy="0.4" iyz="0.0" izz="0.2"/>
</link>
<joint name="wrist" type="continuous">
<parent link="forearm"/>
<child link="hand"/>
<origin xyz="0 .1993 -.05" rpy="1.57057 0 0 " />
<axis xyz="0 1 0" />
</joint>
</robot>
Originally posted by lukewd on ROS Answers with karma: 116 on 2018-09-09
Post score: 1
Original comments
Comment by gvdhoorn on 2018-09-10:
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.
Comment by lukewd on 2018-09-10:
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-52900 in case that helps clearly see the urdf etc.
Comment by lukewd on 2018-09-10:
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.