1
$\begingroup$

I am currently working on developing a model of a robot that moves in space (gravity=0) in the Gazebo simulator. The robot is based on a body with one continuous joint and two revolute joints. Jount1 in the image is a continuous joint and the x-axis rotates. Jount 2 and 3 in the image are revolute joints and rotate on the z-axis.

Control is made by using velocity_controllers of ros_control and Joint Velocity Controller. In this way, the joints of the robot are moved by sending velocity command values, but in this case, the continuous joint must be set to the effect and velocity limit. If not, the continuous joint will be subjected to a large force and the model will explodes. The movement in the Gazebo simulator is shown in the GIF image below.

In this case, the robot first moves Joint3 until the pose of Link3 is straight. Next, robot moves Joint2 until the pose of Link2 is straight. In this process, the speed of Joint1 always publish 0. Also, Control is made by using velocity_controllers of ros_control and Joint Velocity Controller. The robot model explodes when only Joint2 is moved. However, the values of the Joint2 controller were not particularly strange.

I poused the simulation and inspected it, but could not find the cause of the problem. Even if I ​remove the collision settings for each manipulator, it still explodes. I don't think it is a collision problem. I also checked the controller values, but it did not seem like a large force was added. I do not think it is a controller problem. The robot explodes when the manipulators are moved from the folded position to the extended position. In this case, joint1 is not moved, but Jouint1 starts to vibrate and the robot explodes.

When I set the limit it does not explode, but in this state I am not sure if the physics are working correctly. I think it is strange that the model explodes in the first place, but is there anything I should consider about this phenomenon?

A portion of the code for the robot model is available below url. I would be happy to receive your advice.
https://github.com/Yuki-Ikeda0810/space_robot.git

$\endgroup$
4
  • $\begingroup$ Please show us your urdf or sdf. You can include it in the question (formatted as code), or provide a url. $\endgroup$
    – Mike973
    Nov 27, 2023 at 14:20
  • $\begingroup$ Added url for the code. github.com/Yuki-Ikeda0810/space_robot.git $\endgroup$
    – Yuki
    Nov 28, 2023 at 5:07
  • $\begingroup$ I see some unexpected things in your xacro files: 1) multiple visuals for a link, 2) visual/collision/inertial geom that do not align, 3) very large inertial values in arm_2_link, 4) unexpected rpy rotations using origin-tag in many links. I'm not saying all of these things are breaking your simulation. To proceed, you should create a much simpler test case (1 joint), and once it works correctly in gazebo-11, add a new link one at a time, re-testing at each step. $\endgroup$
    – Mike973
    Nov 29, 2023 at 14:49
  • $\begingroup$ Thank you for pointing this out. What exactly is it about each of these that causes the simulation to break? $\endgroup$
    – Yuki
    Nov 30, 2023 at 2:58

1 Answer 1

4
$\begingroup$

This is a famous crash in Gazebo, similar to the one shown below. 

Peek 2022-07-24 12-05.gif

It is one of the confusing errors. To debug this issue, start the Gazebo with simulation paused. We can pause the simulation by setting the paused parameter to true in the launch file. 

Starting Gazebo with the simulation paused  allows us to inspect the robot and world parts or objects. Sometimes models blow up due to parts interfering with each other. The robot may explode if spawned in collision with other environment objects. Once the simulation is started in paused mode, we can expect the robot links visually to see if any models are interfering. We can unpause the simulation by pressing the play button. Expect the models to break again if you press the play button. 

Another reason why robots break apart is the joint controllers. The controllers may be applying huge acceleration/torque commands on the joints. Inspect the spawned controllers, and try to re-tune or stop their effect to see if they are the cause. This flow can help you determine if the controllers are the root cause. 

Make a list of things to look at and mark them as you go not to repeat yourself and become confused. If you feel lost when debugging, start again from the beginning with a clear list of things to check and mark them as you go.

Note: We can also show the wireframe model and the joints for debugging our models. This is very beneficial and makes problems in the model design clear. From the View menu in Gazebo, we can elect Wireframe and Joints options.

$\endgroup$
3
  • $\begingroup$ I have added a GIF file to this post. I poused the simulation and inspected it, but could not find the cause of the problem. Even if I ​remove the collision settings for each manipulator, it still blows up. I don't think it is a collision problem. I also checked the controller values, but it did not seem like a large force was added. I do not think it is a controller problem. The robot blows up when the manipulators are moved from the folded position to the extended position. In this case, joint1 is not moved, but Jouint1 starts to vibrate and the robot blows up. $\endgroup$
    – Yuki
    Nov 17, 2023 at 6:43
  • 1
    $\begingroup$ The first link's controller seems to have no problems. The moment this first link reaches its stretched pose, the issue happens. Does this give you any hint? For example, if in your flow, the second controller is to be activated after the first link reached this pose, then the issue is with the second controller. Got this point? $\endgroup$
    – Robotawi
    Nov 17, 2023 at 7:22
  • $\begingroup$ First, robot moves Joint3 until the pose of Link3 is straight. Next, robot moves Joint2 until the pose of Link2 is straight. In this process, the speed of Joint1 always publish 0. Also, Control is made by using velocity_controllers of ros_control and Joint Velocity Controller. The robot model blows up when only Joint2 is moved. However, the values of the Joint2 controller were not particularly strange. $\endgroup$
    – Yuki
    Nov 20, 2023 at 2:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.