lbr-stack / lbr_fri_ros2_stack

ROS 2 integration for KUKA LBR IIWA 7/14 and Med 7/14
https://lbr-stack.readthedocs.io/en/latest/lbr_fri_ros2_stack/lbr_fri_ros2_stack/doc/lbr_fri_ros2_stack.html
Apache License 2.0
151 stars 46 forks source link

Build URDF at compile time #25

Open cmower opened 1 year ago

cmower commented 1 year ago

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.

mhubii commented 1 year ago

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