RobotnikAutomation / summit_xl_sim

Packages for the simulation of the Summit XL, Summit XL HL and Summit-X (including X-WAM) robots
BSD 2-Clause "Simplified" License
66 stars 39 forks source link

Custom xacro path option #36

Open robert-ros opened 1 year ago

robert-ros commented 1 year ago

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.

alex-arnal commented 1 year ago

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)

RomanRobotnik commented 1 year ago

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.