Ros::InvalidNameException on negative radian limit value [Closed]
Hello,
I am at the stage where I can set up moveit and do some motion planning on my custom robot model.
I have executed the moveit setup assistant and specified the URDF with no problems. I generated the package, made it, installed it, etc.
However when I launch the move_group.launch (or the demo.launch as well) I receive this exception:
...: Loading robot model 'Robot_Arm.SLDASM'...
terminate called after throwing an instance of 'ros::InvalidNameException'
what(): Character [-] at element [45] is not valid in Graph Resource Name [/robot_description_planning/joint_limits/Base-Servo2/max_position]. Valid characters are a-z, A-Z, 0-9, / and _.
and then it detects the process has died and I get dumped out.
If I launch the demo.launch, Rviz does load but I get no model shown, and it has an error about NO PLANNING LIBRARY LOADED and there is nothing to select in the dropdown. I have a feeling this may all be related.
This error seems to be because I have set my limits as -x to y radians for my servos. This is necessary I think.
Why doesn't it like negative radian values for limits? And what is the best way to fix this?
I have thought about redesigning my URDF to make servo limits between 0 and 3.1 radians, if it is possible to do this.
<robot
name="Robot_Arm.SLDASM">
<link
name="base_link">
<inertial>
<origin
xyz="0.00071683 0.020356 0.0337"
rpy="0 0 0" />
<mass
value="0" />
<inertia
ixx="0"
ixy="0"
ixz="0"
iyy="0"
iyz="0"
izz="0" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://robot_arm2/meshes/base_link.STL" />
</geometry>
<material
name="">
<color
rgba="0.75294 0.75294 0.75294 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://robot_arm2/meshes/base_link.STL" />
</geometry>
</collision>
</link>
<link
name="Servo2">
<inertial>
<origin
xyz="0.0022691 0.018959 -0.0094813"
rpy="0 0 0" />
<mass
value="0" />
<inertia
ixx="0"
ixy="0"
ixz="0"
iyy="0"
iyz="0"
izz="0" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://robot_arm2/meshes/Servo2.STL" />
</geometry>
<material
name="">
<color
rgba="0.75294 0.75294 0.75294 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://robot_arm2/meshes/Servo2.STL" />
</geometry>
</collision>
</link>
<joint
name="Base-Servo2"
type="revolute">
<origin
xyz="0.00012 0.0001411 0.0744"
rpy="1.5708 0 0" />
<parent
link="base_link" />
<child
link="Servo2" />
<axis
xyz="0 -1 0" />
<limit
lower="-1.5"
upper="1.5"
effort="0"
velocity="0" />
</joint>
<link
name="Upper_Arm">
<inertial>
<origin
xyz="-0.0013475 0.053 9.5019E-16"
rpy="0 0 0" />
<mass
value="0" />
<inertia
ixx="0"
ixy="0"
ixz="0"
iyy="1.1301E-05"
iyz="0"
izz="0" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://robot_arm2/meshes/Upper_Arm.STL" />
</geometry>
<material
name="">
<color
rgba="0.75294 0 ...
Unless there is an easier way, I think the fastest way to resolve this is to reconstruct my solidworks model so all servos are in the 0 position to begin with, rather than the home position
Then, the home position can be created as a pose later on.