Closed ahendrix closed 9 years ago
The initial_joint_position
tag is causing errors:
$ roscd pr2_description/robots
$ rosrun xacro xacro.py pr2.urdf.xacro > ~/pr2.urdf
$ gz sdf -p ~/pr2.urdf
Warning [parser_urdf.cc:1037] multiple inconsistent <gravity> exists due to fixed joint reduction overwriting previous value [true] with [false].
Warning [parser_urdf.cc:1037] multiple inconsistent <gravity> exists due to fixed joint reduction overwriting previous value [false] with [true].
Error [parser.cc:713] XML Element[initial_joint_position], child of element[joint] not defined in SDF. Ignoring.[joint]
Error [parser.cc:704] Error reading element <joint>
Error [parser.cc:704] Error reading element <model>
Error [parser.cc:353] Unable to read element <sdf>
Error [parser.cc:278] parse as old deprecated model file failed.
Error: SDF parsing the xml failed
The following will comment out the tag:
diff --git a/pr2_description/urdf/upper_arm_v0/upper_arm.gazebo.xacro b/pr2_description/urdf/upper_arm_v0/upp
index 4d7f5cc..174465f 100644
--- a/pr2_description/urdf/upper_arm_v0/upper_arm.gazebo.xacro
+++ b/pr2_description/urdf/upper_arm_v0/upper_arm.gazebo.xacro
@@ -12,10 +12,11 @@
<!-- Elbow flex -->
<xacro:macro name="pr2_elbow_flex_gazebo_v0" params="side">
- <!-- testing initial joint position, to be parsed at urdf2gazebo parse time -->
+ <!-- testing initial joint position, to be parsed at urdf2gazebo parse time ->
<gazebo reference="${side}_elbow_flex_joint">
<initial_joint_position>-1.0</initial_joint_position>
</gazebo>
+ -->
<gazebo reference="${side}_elbow_flex_link">
<turnGravityOff>true</turnGravityOff>
It may not have the intended functionality, but it will at least parse correctly now.
Thank you. Do you mind making a PR for this quick change?
See #237
Migrated from: https://code.ros.org/trac/wg-ros-pkg/ticket/5218