Gazebo_ros_control problem
Hello,
I am a beginner using ROS and gazebo, and my goal is to simulate a wheelchair. I have created a simple representation like this one :
I now want to make the whair moving forward by adding a velocity, using the gazebo_ros_control plugin.
I followed this tutorial : https://dvic.devinci.fr/resource/tuto...
I set the inertial values and the mass of each element : seat (+ one person) : 115kg front wheels : 250g back wheels : 1.5kg
I don't know how to set the collisions surfaces parameters (mu1 mu2 kp kd fdir1), so according to some research I put : mu1 = mu2 = 1.0 kp = 1e+8 kd = 1.0 fdir1 = '1 0 0'
I also set the launch and the config files, all the codes are below. However, when I start the simulation I got this :
All the wheels are at 0 0 0 and under the seat. I don't know why. Finally, I don't know how to configure the pid gains in the config files .yaml, I guess this is the problem, with the fact that the masse is at around 120kg.
<?xml version='1.0' ?>
<robot name="wheelchair_test" ><="" p="">
<link name='base_seat_link'>
<visual>
<origin xyz='0 0 0.4125' rpy='0 0 0'/>
<geometry>
<box size='0.675 0.675 0.675'/>
</geometry>
<material name='orange'>
<color rgba="1 0.5 0 1" />
</material>
</visual>
<collision>
<origin xyz='0 0 0.4125' rpy='0 0 0'/>
<geometry>
<box size='0.675 0.675 0.675'/>
</geometry>
<material name='orange'>
<color rgba="1 0.5 0 1" />
</material>
</collision>
<inertial>
<!-- masse : complete_seat=15kg + person=100kg -->
<mass value='115.0'/>
<!-- full cylinder r=0.5m et h=1.3m -->
<inertia ixx='23.3833' iyy='23.3833' izz='14.375' ixy='0' ixz='0' iyz='0'/>
<origin xyz='0 0 0.4125' rpy='0 0 0' />
</inertial>
</link>
<link name='back_seat_link'>
<visual>
<origin xyz='0 0 0' rpy='0 0 0'/>
<geometry>
<box size='0.675 0.1 0.4'/>
</geometry>
<material name='orange'>
<color rgba="1 0.5 0 1" />
</material>
</visual>
<collision>
<origin xyz='0 0 0' rpy='0 0 0'/>
<geometry>
<box size='0.675 0.1 0.4'/>
</geometry>
<material name='orange'>
<color rgba="1 0.5 0 1" />
</material>
</collision>
<inertial>
<mass value='0.1'/>
<inertia ixx='1e-6' iyy='1e-6' izz='1e-6' ixy='0' ixz='0' iyz='0'/>
<origin xyz='0 -0.2875 0.9500' rpy='0 0 0' />
</inertial>
</link>
<joint name='seat_joint' type='fixed'>
<axis xyz='1 0 0'/>
<parent link ='base_seat_link'/>
<child link ='back_seat_link'/>
<origin xyz='0 -0.2875 0.9500' rpy='0 0 0' />
</joint>
<link name='front_left_wheel'>
<visual>
<origin xyz='0 0 0' rpy ...
Hi @doriiber,
First of all I recommend you Xacro, it will save you time, effort and a lot of useless code.
Then, usually with newer version of Gazebo you can run your simulation with deafult collision and friction values to study the behaviour of your model and then compute your own values based on experimentation.
Finally, I see that you are using a
VelocityJointInterface
for wheel control, I recommend you to adjust the PID values because it seems that the gains are too high for your simualtion. Just start with a P=1 and then increase the values to reach your desired stability. Furthemore, pay attention to the derivative gain, my experienced is that higher values increase exponentially the inestability of the simulation.Hope it helps!
Thank you very much for your response ! It solved my problem. I also have rebuild my file with xacro, it is quite better. For people who may have the same issue, take into account that you may have the same issue if there is no inertial values on your controlled wheels.
Thanks a lot !
Great you solved the problem!. If you do not mind, can you post your solution as an answer aand accept it?
Regards.