Hi,
I am trying to control a robot with 4 wheels in Isaac Gym, by applying velocity control for all of the wheels of a Clearpath Husky. However, the robot does not follow the velocity commands well and there is some unexpected behaviour. I would like to know if there is a better way of controlling the wheels of a robot.
I imported the urdf file, and everything looks fine. Then, I initialize the velocity control and gains for all 4 wheels like this:
props["driveMode"] = (gymapi.DOF_MODE_VEL, gymapi.DOF_MODE_VEL, gymapi.DOF_MODE_VEL, gymapi.DOF_MODE_VEL)
props["stiffness"] = (0.0, 0.0, 0.0, 0.0)
props["damping"]=(6000.0, 6000.0, 6000.0, 6000.0)
Next I provide a target velocity for all four wheels. By giving the all wheels an input of 2*pi, it should drive around 1 m/s and go straight:
gym.set_actor_dof_velocity_targets(gym_env, robot_handle, (2*math.pi, 2*math.pi, 2*math.pi, 2*math.pi)
However, the robot does not drive in a straight line. If I run the simulation for 2000 timesteps, the robot has an offset of about 3m:
If I plot the velocities of all individual wheels, there is also a lot of noise. This was already mentioned in some previous posts (DOF Velocity Offset at Rest):
When I give the wheels a input command of (2pi, -2pi, 2pi, -2pi), the robot should start rotating around itself. However, performance is even worse then:
I think that due to the noises for the velocity in the DOF, I cannot control the wheels well with the PD controller and therefore the robot cannot drive straight (or follow other velocity commands accurately).
So my question is: is there a better way to control the wheels so it follows velocity commands better? Or is there some parameter tuning that can be done? I already tried setting the physx.num_position_iterations and num_velocity_iterations to high numbers (100) but that did not help much.