Universal_Robots_ROS2_Driver icon indicating copy to clipboard operation
Universal_Robots_ROS2_Driver copied to clipboard

(ur_control.launch.py) custom description file from custom pkg

Open MatthijsBurgh opened this issue 1 year ago • 5 comments

Affected ROS2 Driver version(s)

2.4.3

Used ROS distribution.

Rolling

Which combination of platform is the ROS driver running on.

Ubuntu Linux with standard kernel

How is the UR ROS2 Driver installed.

From binary packets

Which robot platform is the driver connected to.

URSim in docker

Robot SW / URSim version(s)

5.15

How is the ROS driver used.

Through the robot teach pendant using External Control URCap

Issue details

Summary

The current version of ur_control.launch.py doesn't allow for a custom description file. As you can only specify a file inside the ur_robot_driver package. https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/blob/6aa6d57a8bf3309dea1c3b7bd03f63b2d7846c07/ur_robot_driver/launch/ur_control.launch.py#L128

Issue details

Of course you could fork the repo and add a custom description file. Of course, you shouldn't. I wanted to suggest a change to use the description_package argument instead of the hardcoded ur_robot_driver, though, the default of the description_package is ur_description. So there is a conflict. So I leave it up to you, whether you want to introduce another argument or come with another solution. But I think it very useful if the ur_control.launch.py can be used with a custom description file from a custom package.

Steps to Reproduce

Not relevant

Expected Behavior

Being able to use the ur_control.launch.py with my own custom description file located in my own description package.

Actual Behavior

Only being able to use a description file from ur_robot_driver.

Workaround Suggestion

Besides just copying (parts of) the ur_control.launch.py to my own package, there is no workaround.

Relevant log output

No response

Accept Public visibility

  • [X] I agree to make this context public

MatthijsBurgh avatar Mar 18 '24 10:03 MatthijsBurgh

Thank you for the issue, this was introduced in #877 and seems like an oversight to me. I'll create a PR to fix this.

RobertWilbrandt avatar Mar 18 '24 10:03 RobertWilbrandt

I have now implemented the following change for myself. Let me know you want to a PR with this solution.

Change the default value of the description_file DeclareLaunchArgument to PathJoinSubstitution([FindPackageShare("ur_robot_driver"), "urdf", "ur.urdf.xacro"]), and just replace https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/blob/6aa6d57a8bf3309dea1c3b7bd03f63b2d7846c07/ur_robot_driver/launch/ur_control.launch.py#L128 with description_file,.

But I could also see, you will move all the urdf/xacro files to ur_description. Then you can use description_package. But than you can't use default xacro, with custom calibration files.

So let me know what you want.

MatthijsBurgh avatar Mar 18 '24 13:03 MatthijsBurgh

Hey @RobertWilbrandt there's a similar issue but with the moveit_config_package variable in ur_moveit.launch.py where this variable is used to set the package for the srdf, rviz, kinematics, and other configurations. It would probably be best to have separate variables for some of these that would most likely have different values in a custom project.

That could also be said for the description_package variable in the same file, since it dictates the package for the urdf and yaml parameters.

liamcarlos avatar Mar 19 '24 17:03 liamcarlos

Oh yeah it makes sense that we had to take a urdf from a package different from description_package at that point, as we wanted to move all specific driver / gazebo / ignition parts out of the description package. Maybe we have to do some restructuring here, e.g. have some new kinematics_package argument to load the yamls from and use description_package for the urdf again. Do you have any thoughts on this @fmauch @VinDp ?

RobertWilbrandt avatar Mar 20 '24 10:03 RobertWilbrandt

@RobertWilbrandt Yeah just another heads up, the Gazebo ROS2 simulation package would also have to be updated. It also uses those packages, so changing them would break that package as well..

liamcarlos avatar Mar 22 '24 15:03 liamcarlos

Thanks, yeah i think we have to go through all ur packages and see how this is handled after the change.

RobertWilbrandt avatar Mar 27 '24 12:03 RobertWilbrandt

We're currently in the processing of updating things, see #977 and https://github.com/ros-controls/ros2_control/pull/1501

fmauch avatar Apr 24 '24 11:04 fmauch