Hello everyone, I am a little fish who is happy to sleep in tomorrow. Today the old words repeat, say to do robot simulation of some of the problems encountered, here fish based on the article written before, again summarized.

1. Common problems with Gazebo simulation

The following pits, from the fish’s own tragic experience, as well as fish powder to ask the fish questions summed up together.

  • 1. The robot took off and went disco dancing
  • 2. The robot cannot be controlled, there is no odometer, radar data, etc
  • 3. As soon as the robot is turned on, it directly dances and moves, sometimes in a regular way, such as walking forward automatically
  • 4. The chassis wheels turn wildly, one left and one right
  • 5. Gazebo control plugin conflict (two wheel differential and manipulator controller)
  • 6. The exported models are separated in location, one east and one west
  • 7. The robot fell to the ground as soon as it was loaded, as if it had rickets
  • 8. The gripper can’t grip anything, it slides out of your hand when you grasp it
  • Gazebo’s card won’t move
  • 10. There are other weird pits waiting for you to share with the fish

Xiaoyu has made a composite robot model, is a mobile chassis and a mechanical arm assembled together, in the process of making a model, xiaoyu can be said to see a variety of strange situations above. After that modeling from scratch, Xiaoyu understood most of the routines of Gazebo. Some people said that Gazebo was difficult to use, so he abandoned the pit as soon as possible. Xiaoyu thought that it was because everyone had encountered too many problems and there was no relative solution, so he had to change a pit eventually.

2. Solutions

It is not terrible to encounter a problem, but not to know what the problem is. Locate not, so small fish say how to locate a problem first. The fish sorted the above questions and summed them up.

2.1 Dancing

Phenomenon:

  • 1. The robot took off and went disco dancing
  • 3. As soon as the robot is turned on, it directly dances and moves, sometimes in a regular way, such as walking forward automatically

Possible causes:

  • Flatness problem

    Support at the bottom of the first is about robot wheels, wheels and may not be smooth, the small fish to draw out 10000 key symbol, because be the worst in this pit, turn the wheels have been, but robots anyway, thought is the friction force and moment is not enough, but how are useless, finally understand was above the wheels on the ground. If a problem is found, you can manually change the collision position of the URDF joint or link.

  • Friction problem

    Check the friction of the wheel, such as the two-wheel differential model, in addition to checking the driving wheel, you also check the friction of the slave wheel, the reason why the car can not move may be because the friction of the slave wheel is too much.

  • Internal problems

    Including friction, rigidity coefficient, mass, inertia matrix. How to adjust, you need to tune while feeling, more you will have a feeling. If you see your wheels getting squashed, turn up the rigidity factor.

  • Check wheel torque

    Each driving wheel has a parameter that can be configured, called the torque of the wheel, which is the torque of the wheel. Sometimes, if the wheel does not move, it may be the force.

2.2 No control, no data

The phenomenon of

  • 2. The robot cannot be controlled, there is no odometer, radar data, etc

why

  • After checking its model, it was found that the joint name of the two rounds of differential plug-in was incorrectly configured, and the plug-in did not report any errors. As a result, there was no CMD_VEL topic. Yes, many plug-ins have debug mode. If any error occurs, you can enable the debug mode to view logs.

2.3 Catching a dog and beating a chicken -URDF error

The phenomenon of

  • 4. The chassis wheels turn wildly, one left and one right
  • 6. The exported models are separated in location, one east and one west

Possible reasons for

  • The reason is the URDF configuration problem, you can use RVIz first, make sure rVIZ is ok, then put gazebo to try.

2.4 Straight down, like a power cut

The phenomenon of

  • 7. The robot fell to the ground as soon as it was loaded, as if it had rickets

Possible reasons for

  • Gazebo has the concept of a controller, which is a motor for each joint, the type of motor that needs to be manually configured, whether it’s a stepper motor or a servo motor, etc.

2.5 Plug-in Configuration

The phenomenon of

  • 8. The gripper can’t grip anything, it slides out of your hand when you grasp it
  • 5. Gazebo control plugin conflict (two wheel differential and manipulator controller)

Possible reasons for

  • There is a bug in gazebo’s “grab” plugin that binds two objects together when they are too close to each other.
  • There is plug-in conflict this, but we should rarely encounter, encounter is very uncomfortable. For example, the two-wheel differential plug-in and the trajectory execution plug-in of the manipulator should not be loaded in URDF, which will conflict and lead to wheel failure. Don’t ask the little fish how they know.

2.6 Graphics Card Driver

The phenomenon of

  • Gazebo’s card won’t move

The solution

  • Video card to run Gazebo, refer to this article: Gazebo slow and slow? Put your video card to work! Click here to see how to run Gazebo ~

3. Summary

Gazebo is a simulation tool that can be used independently of ROS, so don’t mistake it for an integration with ROS. In ROS2, installing ROS2 does not automatically install Gazebo, so we need to install gazebo manually.

That’s all for today. I wish you a happy weekend. By the way, welcome to join the fish group and learn together.