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

unable to parse urdf file

asked 2012-06-20 04:49:37 -0600

Lucian gravatar image

updated 2012-06-20 11:53:49 -0600

Eric Perko gravatar image

Hello everyone,

The question is extremely simple: when I type the line (quoted):

<origin xyz="${reflect*camera_offset_x} 0 0" rpy="0 ${camera_offset_p} 0" />

the urdf is parsed, everything is great, I can visualize in rviz and when I type:

<origin xyz="${reflect*camera_offset_x} 0 0" rpy="0 ${reflect*camera_offset_p} 0" />

it doesn't work anymore..

Here, reflect can be 1 or -1 and it seems to by no problem for entering negative values for the angle offsets...

So where the hell could the problem come from?

Thanks for your time. Yours, Lucian

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-06-20 04:57:48 -0600

Lucian gravatar image

I think I figured this one out:

camera_offset_p was declared as:

<property name="camera_offset_p" value="${2*M_PI/360*18}"/>

and if I declare it as:

<property name="camera_offset_p" value="0.314159265"/>

which is equivalent, it works again.

Maybe someone could explain me why then?

edit flag offensive delete link more

Comments

There is no pre-defined constant M_PI in xacro as far as I know.

Lorenz gravatar image Lorenz  ( 2012-06-20 05:21:25 -0600 )edit

I already predefined M_PI as 3.1415

Lucian gravatar image Lucian  ( 2012-06-21 04:04:57 -0600 )edit

Question Tools

Stats

Asked: 2012-06-20 04:49:37 -0600

Seen: 2,448 times

Last updated: Jun 20 '12