xacro Invalid parameter "type" None None
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>
Asked by burhanok on 2020-01-18 16:12:26 UTC
Answers
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
Asked by marguedas on 2020-01-19 11:36:23 UTC
Comments