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

xacro Invalid parameter "type" None None

asked 2020-01-18 15:12:26 -0500

burhanok gravatar image

updated 2020-01-19 07:57:45 -0500

gvdhoorn gravatar image

Straight dump of the error:

when instantiating macro: joint (/home/rosdeepy/catkin_ws/src/robot_manipulator/xacro/function.xacro)
instantiated from: joint (/home/rosdeepy/catkin_ws/src/robot_manipulator/xacro/function.xacro)
in file: /home/rosdeepy/catkin_ws/src/robot_manipulator/xacro/manipulator.xacro
Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/kinetic/lib/xacro/xacro --inorder '/home/rosdeepy/catkin_ws/src/robot_manipulator/xacro/manipulator.xacro'] returned with code [2]. 

Param xml is <param command="$(find xacro)/xacro --inorder '$(find robot_manipulator)/xacro/manipulator.xacro'" name="robot_description"/>
The traceback for the exception was written to the log file

Macro definition (?):

<?xml version="1.0" ?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
    <xacro:macro name = "kutu" params = "name size">
        <link name="${name}">
            <visual>
                <geometry>
                    <box size="${size}"/>
                </geometry>
            </visual>
        </link>
    </xacro:macro>

    <xacro:macro name = "joint" params = "joint_name parent child">
        <joint name="${joint_name}" type="fixed">
            <origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
            <parent link="${parent}"/>
            <child link="${child}"/>
            <axis xyz="0.0 0.0 1.0"/>
            <limit lower="3.14" upper="-3.14" effort="1000.0" velocity="0.5"/>
        </joint>
    </xacro:macro>
</robot>

Robot definition (?)

<?xml version="1.0"?>
<robot name="robot_description" xmlns:xacro = "http://www.ros.org/wiki/xacro">
    <xacro:property name = "link_name_00" value = "base_link"/>
    <xacro:property name = "link_name_01" value = "link_01"/>

    <xacro:include filename="$(find robot_manipulator)/xacro/function.xacro" />

    <xacro:kutu name = "${link_name_00}" size = "1.0 1.0 1.0"/>
    <xacro:joint joint_name = "joint_01" parent = "${link_name_00}" child = "${link_name_01}"/>
    <xacro:kutu name = "${link_name_01}" size = "0.5 0.5 0.5"/>
</robot>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-01-19 10:36:23 -0500

marguedas gravatar image

Xacro assumes the <joint> tag refers to the xacro:joint macro implicitly. And it complains because your xacro:joint doesn't declare any argument named type

Renaming your macro xacro:joint to something not colliding with other tags like xacro:customjoint should fix the issue

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-01-18 15:12:26 -0500

Seen: 31,827 times

Last updated: Jan 19 '20