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

Can I provide a "Null" value for a xacro macro parameter?

asked 2013-08-08 06:04:02 -0500

nemesis gravatar image

updated 2013-11-18 19:32:37 -0500

tfoote gravatar image

I have a .urdf.xacro file where a particular xacro macro has been defined with a few parameters including - "mesh". When I instantiate this particular macro in another file, I wish to leave out the "mesh" parameter and instead define a shape (like a rectangular box) of my own.

Is this possible at all?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-08-12 01:42:45 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

The xacro converter seemed to be quite literally to me, but you could look at it's source.

Or you could remove mesh/shape from that macro and make two macros extending the base macro for both mesh and shape.

And mesh="" won't work?

edit flag offensive delete link more

Comments

I will look into the source, thanks! I tried mesh =" " but that didn't work because it searched for the ".stl" file (no name extension). I will check if modifying the xacro works or not. Thanks again!

nemesis gravatar image nemesis  ( 2013-08-12 06:48:38 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2013-08-08 06:04:02 -0500

Seen: 268 times

Last updated: Aug 12 '13