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

Book: Mastering ROS for Robotics Programming, 2nd Edn; Chapter 2 - Working with 3D Robot Modeling in ROS

asked 2016-08-19 07:28:28 -0600

Hi,

I am facing a problem in running tutorials given in the book: Mastering ROS in Robotic Programming, Chapter 2.

I am using Ubuntu 16.04 with ROS Kinetic. In particular, when I run my launch file as

khan@khan:~/catkin_ws/src/mastering_ros_robot_description_pkg/launch$ roslaunch mastering_ros_robot_description_pkg view_arm.launch

The following error occurs.

unknown macro name: xacro:base 
XacroException(u'unknown macro name: xacro:base',)

I have checked the file again and again and there is nothing I changed. It is the tutorial files. I don't know why it is not running. Please, suggest any help. Thank you so much.

edit retag flag offensive close merge delete

Comments

If this is the code you are referring to, then the readme explicitly states that:

The code is comaptible with ROS Jade and ROS Indigo

so it could well be that something doesn't work in Kinetic.

gvdhoorn gravatar image gvdhoorn  ( 2016-08-20 03:20:51 -0600 )edit

I have tried to run this file for ROS Indigo as well. I got the same error.

Abdul Mannan gravatar image Abdul Mannan  ( 2016-08-30 21:32:04 -0600 )edit
1

I would suggest reporting this issue on the issue tracker of qboticslabs/mastering_ros.

gvdhoorn gravatar image gvdhoorn  ( 2016-08-31 02:52:00 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-09-08 09:03:50 -0600

Hi, Dr Abdul Mannan

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:

screenshot from 2016-09-08 20 46 18

As mentioned by error, I also don't find the definition of macro base. 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:

screenshot from 2016-09-08 21 11 28

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

edit flag offensive delete link more

Comments

Thank you so much myyerol for you response. That was so long waited problem. You have no idea how much you helped me. I owe you. I am coming to Tsinghua University for post doctorate. I shall be happy to catch you up there. Once again thank you so much.

Abdul Mannan gravatar image Abdul Mannan  ( 2016-09-08 22:17:20 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-08-19 07:28:28 -0600

Seen: 6,115 times

Last updated: Sep 08 '16