UniversalRobots / Universal_Robots_ROS2_Gazebo_Simulation

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

UR5 controller is shaking #11

Closed relffok closed 7 months ago

relffok commented 2 years ago

I noticed that when using the simulation with different UR types using ros2 launch ur_simulation_gazebo ur_sim_control.launch.py ur_type:=ur5 all robots work except for UR5 which is weirdly shaking.

Fresh galactic binary build using Universal_Robots_ROS2_Gazebo_Simulation-not-released.galactic.repos (no ros2_control built from source)

destogl commented 2 years ago

can you show a gif or someting? Is this maybe caused by the performance of your machine? I have been doing multi-robot simulations with this setup and worked fined with different controllers.

relffok commented 2 years ago

I dont think its a performance issue since the resolution time is fine and the other robot types have no issues.

Using the launch command above I get (only UR5):

https://user-images.githubusercontent.com/57466265/166232520-6e096719-2602-43d1-aaca-5d10103e3ec9.mp4

relffok commented 2 years ago

Could it be the configuration of the base link because that's different in your multi-robot simulation? Is the simple launch file ros2 launch ur_simulation_gazebo ur_sim_control.launch.py ur_type:=ur5 working for you? If yes I'll have to check another machine too.

EDIT: I realized that this is also happening to UR3 and UR10 now. But not to ur3e,ur5e nor ur10e! If this does not happen to anyone else, it might be an issue on my side..

meikse commented 2 years ago

I do experience the same issue with the ur5. I do not know if the frame rate of the gif was very low while capturing, but for me the ur5 is shaking even faster. Highly appreciate a solution as well, if someone figured it out already.

relffok commented 2 years ago

@meikse Did you try attaching it with a static transform to the world frame / anything else ?

sabrinaacardoso commented 2 years ago

The problem is that they are being instantiated at z = 0. For this not to happen, it is necessary to instantiate UR in the world with approximately z = 0.05. Depends on the UR. So just go testing the minimum value of z.

fmauch commented 9 months ago

@sabrinaacardoso do you have any insight of why this helps / is necessary?

gavanderhoorn commented 9 months ago

Could be that with collisions enabled (link collisions in gazebo that is), anything spawned too close / in the ground plane will start to become unstable (as that's a collision object itself) due to being 'inside' another object. At least that was my experience a couple years ago.

I believe a Z offset was used by the various spawn scripts, not sure whether that's still there.

Why some models may need this and others don't could be due to their exact shapes / shapes of the meshes.