Ask Your Question
0

unable to parse urdf file

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

Lucian gravatar image

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

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 -0500

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 imageLorenz ( 2012-06-20 05:21:25 -0500 )edit

I already predefined M_PI as 3.1415

Lucian gravatar imageLucian ( 2012-06-21 04:04:57 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

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

Seen: 1,506 times

Last updated: Jun 20 '12