0

I'm new to Bullet. I'm using pybullet and want to make a car. I'm using this standard URDF-model for modelling the car.

I want my car to go, for example, at a speed of 20 in the straight direction. I can write:

p.resetBaseVelocity(car, [20, 0, 0])

and everything will work.

This code:

linearVelocity, angularVelocity = p.getBaseVelocity (car)
print(linearVelocity)

will output (20, 0, 0). But of course, I want to achieve this effect with the help of wheels, using setJointMotorControl2, VELOCITY_CONTROL, and targetVelocity. I saw this example racecar and I tried it to run this machine on an infinite plane as in the example, But the linear velocity that I managed to achieve is about (1.0, 0, 0), and I want linearVelocity (20, 0, 0). I tried to change the code in the URDF model:

<Limit effort = "10" velocity = "100" />

I set it to very high values ​​and made the target velocity very large but there was no effect. How can I change the URDF model or give, please, a simple example of a model that can travel at high speeds.

I can of course do it artificially with:

 linearVelocity = [x * 2 for x in linearVelocity]
 p.resetBaseVelocity (my_car, linearVelocity)

But it's not beautiful, I want do this with the target velocity of the wheels. Please help.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Naduxa
  • 55
  • 1
  • 11

1 Answers1

1

The limit and effort fields in a URDF file are not processed by pybullet.

You can modify the targetVelocity (for the wheels) in that racecar example to go faster.

Erwin Coumans
  • 1,766
  • 14
  • 22