Move my wheelchair

albyland

26-06-2011 01:01:01

Hello all,
firstly sorry for my bad english.
*I need to make a wheelchair. i'm using shapedescription with wheelDescription for back wheels and boxDescription for motor. Is it a good way ?

*So now I have my motor and wheels, for move my "wheelchair" I use addLocalForce to my motor and for rotate I use addLocalTorque. Is it the good way ?
*How I can do If I want that my "wheelchair" stop to move when I don't touche key
sorry again for my bad english.
Thanks.

betajaen

26-06-2011 07:35:44

If your pushing the wheel chair then forces applied to the box is fine.
If your wheelchair is motorised; then you need to set the torque to the wheels. Equal torque to both wheels to move forward/backward, or torque which is in opposite directions to turn.

albyland

26-06-2011 23:28:24

If your pushing the wheel chair then forces applied to the box is fine.
If your wheelchair is motorised; then you need to set the torque to the wheels. Equal torque to both wheels to move forward/backward, or torque which is in opposite directions to turn.


Thanks betajaen. My wheelchair is motorised, I need to do like that ?


if (pKeyboardInput->isKeyDown(OIS::KC_W))
{
speedR++;
speedL++;
}
if (pKeyboardInput->isKeyDown(OIS::KC_S))
{
speedR--;
speedL--;
}
if (pKeyboardInput->isKeyDown(OIS::KC_A)) speedR++;
if (pKeyboardInput->isKeyDown(OIS::KC_D)) speedL++;

WheelR->setMotorTorque(speedR);
WheelL->setMotorTorque(speedL);



Is it the good way ?
Thanks