lbr_fri_ros2_stack icon indicating copy to clipboard operation
lbr_fri_ros2_stack copied to clipboard

Build URDF at compile time

Open cmower opened this issue 3 years ago • 3 comments

It's useful to have access to URDF file generated from the xacro description (e.g. PyBullet doesn't support loading from xacro, only URDF), in ROS1 this is possible. I assume it should be possible in ROS2 - this would be a worthwhile feature to add to the lbr_description package.

cmower avatar Nov 17 '22 12:11 cmower

this is still possible, see https://github.com/ros2-gbp/xacro-release/blob/debian/foxy/xacro/cmake/xacro-extras.cmake.

When doing so, variables are evaluated at compile time, meaning e.g. robot_name and sim in https://github.com/KCL-BMEIS/lbr_fri_ros2_stack/blob/5ccc5263ed7883c08f6890d0339a21dd6114e2a9/lbr_description/urdf/med7/med7.urdf.xacro#L9 will be frozen

mhubii avatar Nov 28 '22 15:11 mhubii