summit_xl_sim icon indicating copy to clipboard operation
summit_xl_sim copied to clipboard

Custom xacro path option

Open robert-ros opened this issue 2 years ago • 2 comments

This commit allows to use a custom xacro path.

Until now, you can select the xacro package, but it is hardcoded for /robot/ path. For example, you can select robot_bringup as robot package, but the full path will be robot_bringup/robots/summit_xl_std.urdf.xacro

This commit implements the use_custom_xacro_path and custom_xacro_path parameters.

When custom_xacro_path is set to False, the default path is summit_xl_description/robots/. If it set to True the path will be custom_xacro_path.

This commit with the default parameters does not affect to the normal behaviour of the simulation.

robert-ros avatar Oct 25 '22 11:10 robert-ros

I think the solution is so complex and it is not necessary to add an additional boolean argument and conditional structures. I propose to add xacro_robot_path argument directly in summit_xl_complete.launch and summit_xl_gazebo.launch to set summit_xl_robot.launch argument. The default value of xacro_robot_path should be the same as the default value of this argument in summit_xl_robot.launch for melodic-devel branch:

<arg name="xacro_robot_path" default="$(eval find(xacro_robot_package) + '/robots/' + xacro_robot)"/>

If you want to use a custom path, setting this parameter when launching the simulation should be enough.

roslaunch summit_xl_sim summit_xl_complete.launch xacro_robot_path:="/my/custom/path"

In theory, it should override the deafult value for the xacro_robot_path (that depends on the other arguments only if uses default values)

alex-arnal avatar Nov 09 '22 16:11 alex-arnal

Great idea, although I agree with Alex in making it as simple as possible. Just one xacro path for all the possible robots should be fine.

RomanRobotnik avatar Nov 11 '22 07:11 RomanRobotnik