1
$\begingroup$

Here's a snippet of my urdf that's causing the problem:

<!-- Left wheel link -->

<joint name="left_wheel_joint" type="revolute">
    <parent link="base_link" />
    <child link="left_wheel" />
    <!-- push the wheel out in the y axis, to end of the chassis, from the center of the axle -->
    <!-- align the weel to be vertical, not horizontal which is the default -->
    <origin xyz="0 0.1 0" rpy="-1.5708 0 0" />
    <!-- axis of rotation should be z axis -->
    <axis xyz="0 0 1" />   
    <limit>
        <lower>-2*3.14159</lower>
        <upper>2*3.14159</upper>
        <effort>100</effort>
        <velocity>10</velocity>
    </limit>
</joint>

<link name="left_wheel">
    <visual>
        <origin xyz="0.15 0 0.075" rpy="0 0 0" />
        <geometry>
            <cylinder radius="0.05" length="0.04" />
            <material name="rubber" />
        </geometry>

    </visual>
</link>

Here's the output from the robot_state_publisher:

[INFO] [robot_state_publisher-1]: process started with pid [89902]
[robot_state_publisher-1] Error:   joint limit: no effort
[robot_state_publisher-1]          at line 136 in ./urdf_parser/src/joint.cpp
[robot_state_publisher-1] Error:   Could not parse limit element for joint [left_wheel_joint]
[robot_state_publisher-1]          at line 454 in ./urdf_parser/src/joint.cpp
[robot_state_publisher-1] Error:   joint xml is not initialized correctly
[robot_state_publisher-1]          at line 233 in ./urdf_parser/src/model.cpp
[robot_state_publisher-1] Failed to parse robot description using: urdf_xml_parser/URDFXMLParser
[robot_state_publisher-1] terminate called after throwing an instance of 'std::runtime_error'
[robot_state_publisher-1]   what():  Unable to initialize urdf::model from robot description
[ERROR] [robot_state_publisher-1]: process has died [pid 89902, exit code -6, cmd '/opt/ros/humble/lib/robot_state_publisher/robot_state_publisher --ros-args --params-file /tmp/launch_params_msc5wv94'].

And here's the output to check_urdf robot_core.xacro :

Warning: link 'chassis_link' material 'metal' undefined.
         at line 84 in ./urdf_parser/src/model.cpp
Warning: link 'chassis_link' material 'metal' undefined.
         at line 84 in ./urdf_parser/src/model.cpp
Error:   joint limit: no effort
         at line 136 in ./urdf_parser/src/joint.cpp
Error:   Could not parse limit element for joint [left_wheel_joint]
         at line 454 in ./urdf_parser/src/joint.cpp
Error:   joint xml is not initialized correctly
         at line 233 in ./urdf_parser/src/model.cpp
ERROR: Model Parsing the xml failed

I have been following this guide.

Any help will be greatly appreciated, Thankyou.

$\endgroup$

2 Answers 2

1
$\begingroup$

use this format:

<limit upper="${2*3.14159}" lower="${-2*3.14159}" effort="100" velocity="10"/>
$\endgroup$
0
$\begingroup$
    <lower>-2*3.14159</lower>
    <upper>2*3.14159</upper>

This will not work. Use ${} to perform mathematical operation. In your case:

    <lower>"${-2*3.14159}"</lower>
    <upper>"${2*3.14159}"</upper>
$\endgroup$
1
  • $\begingroup$ I tried that, and even removing the maths all together: ``` <lower>-6.28318</lower> <upper>6.28318</upper> ``` I still get the same error :( $\endgroup$ Apr 15 at 14:19

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.