Closed abdul-mannan-khan closed 7 years ago
Hi, @u04617
Maybe I know your problem. According to your terminal's warning informations, I think you use the distribution of ROS is Jade or Kinetic, and the problem is just on the distribution of ROS. Firstly, I am using the Indigo, and I use the following command no any problem.
$> roslaunch mastering_ros_robot_description_pkg view_arm.launch
So according to your error information, I find the following lines in the seven_dof_arm.xacro:
As mentioned by error, I also don't find the definition of macro base just like the following format:
<xacro:macro name="base", params="xxx, ..." >
......
</xacro:macro>
For example, if you are coding by using C++, you need call a function, but the function is not defined and implemented yet, the compiler must report a error. So solution is commenting out these lines:
As for why indigo can run, I think the checked mechanism of indigo's xacro is less than Jade or Kinetic.
In addition to the error, there are warning informations on the terminal. If you visit Xacro wiki, you can find the xacro of Jade or Kinetic has more enhanced functionality and more limits than that of Indigo. So for the cause of warning, you can get by running xacro with option --check-order on the terminal just like
$> roscd mastering_ros_robot_description_pkg
$> rosrun xacro xacro.py --check-order urdf/seven_dof_arm.xacro
Last, according to the warning informations, I think the solution is here: Deprecated Syntax
Thank you so much myyerrol. I followed the instructions and issue is resolved. Thank you so much.
I am using the kinetic, and met the same issue. Yes, your solution works by commenting out those three macros, i.e., base, arm, and gripper. My questions is why it functions well with the old ROS distributions, such as Indigo. Where were those three macros defined in Indigo? Thanks.
Hi, @Xianyong
Firstly, you can look the following piccture:
Just you can see, it is the tree relationship of seven_dof_arm, and base, arm, gripper modules don't appear in it. In fact, I think that three modules are redundant or useless at least now(Because I'm not very clear about the author's intentions).
Secondly, for why it do well in the indigo distribution, the following picture may help you:
This picture is captured in the seven_dof_arm.urdf. In indigo, for no defined macros, Xacro can copy those directly from the .xacro file. But for kinetic, Xacro report error. As for the reason, if you visit the Xacro, you can find the checked mechanism of indigo's xacro is less than kinetic.
I had the same error.
All I did is include the file that contains the macro first and then calling it.
<xacro:include filename="robot_essentials.xacro"/>
<xacro:robot_wheel prefix="front_left" />
I have been trying to run follow this book but I am facing some problems particularly in Chapter 2 and 3 and specifically in the file view_arm.launch. It is worth mentioning that this error is also reported in ROS website as well (link)
Whenever I run this file, I get the following error
I have been trying to resolve this problem in any way I can but it is not working.
I am also seeing this warning along with the above mentioned error,
Please, help me out how can I resolve this. Thank you.