UniversalRobots / Universal_Robots_ROS2_Gazebo_Simulation

BSD 3-Clause "New" or "Revised" License
63 stars 27 forks source link

Missing launch file for moveit #8

Closed Maltergate closed 9 months ago

Maltergate commented 2 years ago

Hi everyone,

I installed the Gazebo simulator as per instructions, using Ubuntu 20.04 and ROS2 Galactic. Launching ros2 launch ur_simulation_gazebo ur_sim_control.launch.py works like a charm. I then try to launch the test_controller as described with ros2 launch ur_bringup test_joint_trajectory_controller.launch.py and I don't get anything moving. as I get the output from this node: https://pastebin.com/p028hS6Z

But, more importantly (for me) is that when I try to launch the configuration with gazebo and MoveIt with ros2 launch ur_simulation_gazebo ur_sim_moveit.launch.py I get: https://pastebin.com/LQqBprDy

And, fair enough, I get no launch folder there: https://pastebin.com/raw/LWGXwzrp

lmendyk commented 2 years ago

I have the same issue. I think the reason cold be the wrong package used, the ur_bringup may need to be used instead of ur_moveit_config. But I will need to verify that.

destogl commented 2 years ago

This will be resolved very soon. Please check above PR

fmauch commented 2 years ago

https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/pull/278 has been merged today and I just re-tested with ROS2 galactic. There, the moveit launchfile works fine if the default controller is switched.

For ROS2 galactic (from binary packages) the test_joint_trajectory_controller.launch.py seems not to work since the start configuration is different to the one expected.

destogl commented 2 years ago

For ROS2 galactic (from binary packages) the test_joint_trajectory_controller.launch.py seems not to work since the start configuration is different to the one expected.

Yes, this is “initial_value” issue. Galactic version of Gazebo Plugin does not support that. So, we have to adjust configuration of the “test_joint_trajectory_controller”

https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/pull/278 has been merged today and I just re-tested with ROS2 galactic. There, the moveit launchfile works fine if the default controller is switched.

Does scaled controller does not work with Gazebo? Or what's exact issue?

fmauch commented 2 years ago

Does scaled controller does not work with Gazebo? Or what's exact issue?

Yes, exactly. Starting

ros2 launch ur_simulation_gazebo ur_sim_control.launch.py launch_rviz:=false initial_joint_controller:=scaled_joint_trajectory_controller

yields the error

[gzserver-4] [ERROR] [1645691788.270588178] [controller_manager]: Can't activate controller 'scaled_joint_trajectory_controller': State interface with key 'speed_scaling/speed_scaling_factor' does not exist

I tried removing the unless simulation block in the description. While gazebo starts fine without that unless statement, the error stays when using the scaled jtc.

destogl commented 2 years ago

I tried removing the unless simulation block in the description. While gazebo starts fine without that unless statement, the error stays when using the scaled jtc.

This is expected because Gazebo currently uses only “position”, “velocity” and “effort” interfaces.

relffok commented 2 years ago

Tested the moveit launch file with gazebo today but it only works for me if I remove the scaled_joint_controller from controllers.yaml in the ur_moveit_config package. Is this intended?

destogl commented 2 years ago

Tested the moveit launch file with gazebo today but it only works for me if I remove the scaled_joint_controller from controllers.yaml in the ur_moveit_config package. Is this intended?

Yes, this is the current drawback. One cannot use scaled controller with simulators. There are some functionalities that should be implemented to support this.

relffok commented 2 years ago

Yes, this is the current drawback. One cannot use scaled controller with simulators. There are some functionalities that should be implemented to support this.

I understood, but this also means that the simulation moveit launch file does not work without modifications, right? Instead of passing ur_controllers.yaml here: https://github.com/UniversalRobots/Universal_Robots_ROS2_Gazebo_Simulation/blob/708c48bfb10cb754728d4c856187579110d5342b/ur_simulation_gazebo/launch/ur_sim_moveit.launch.py#L123 a separate controller configuration file for gazebo like is needed that does not contain scaled_joint_controller at all.

relffok commented 2 years ago

EDIT: I must have had something mixed up, somehow the default flag works now (I checked before but it didnt..) and I can keep scaled_trajectory controller in the controllers.yaml.. Sorry about that and thanks for the reply!

fmauch commented 9 months ago

This is resolved for humble and will be resolved by #43 Thank you @relffok for sticking with this.