Robot simulation and motor control

Hanz
Posts: 14
Joined: Fri Jun 01, 2007 5:36 am

Robot simulation and motor control

Post by Hanz »

In my simulator I need to control the trajectories of the joints based on my path planning algorithms. I want to know how to do it using Bullet.

Following are the necessary context and problem statement.

Context:

1. My simulation model (say, a mobile robot) consists one mobile root link and other links are connected to the root link using revolution joint.

2. The robot moves around just like the car in VehicleDemo, but since the accuracy is an key issue and robot wont move too fast, I decided to use normal simulation method instead of raycasting.

3. Since my main target is using the simulator to verify my controller/algorithms, so I would like to monitor/control the internal states, such as joint torque, collision forces when collided and joint position/velocity.

And here are the problems (I did searched in forum, but no clear answers available ) and general questions:

1. btHingeConstraint can be used to simulate the robot joint, but how can I control its velocity during simulation.
IMHO, usually Hinge joint is used to simulate passive joint, that is, no driving torque applied on it. However we do have

Code: Select all

   enableAngularMotor (bool enableMotor, btScalar targetVelocity, btScalar maxMotorImpulse);
to make a actuated one. The problem is, after set the targetVelocity and add the constraint, is it possible to change the targetVelocity during simulation? I am looking for a interface like

Code: Select all

   setVelocity (btScalar targetVelocity);
but it seems that we do not have it.

Here for my simulation I need to change the state of the connected rigidbodies? Or, I must call enableAngularMotor in my control loop with generated velocity?

2. As I said I dont want to use raycasting for mobile robot simulation, however I am not sure if I use a normal rigid body (for example, something like a disk) for wheel simulation, does it hurt the performance a lot?

3. Maybe it is a stupid question but are the constraints implemented in Bullet accurate enough for robot/industrial simulation? I am asking because it is said that ODE can not be used for such kind of simulations, how about Bullet?

4. I know featherstone constraint will be added to Bullet later, however I am not sure about the priority. :) If someone want to implement featherstone in Bullet, is there any guidance for him to start? Or generally speaking, is there any guidance for adding constraints to Bullet?

5. Is there any plan to add motor module to Bullet. Maybe it is not necessary for game engines but it helps a lot for industrial simulations.

Thank you for your time.