how to determine rotational velocity relative to direction robot is "facing"
Posted: Thu May 31, 2018 6:25 pm
This feels like a common question but I could not find it...
Generally: I'm looking to know rotational velocity relative to world orientation.
Specifically: I have a "balancing robot", (a stick on two wheels), where the stick is the base link. I want to know how fast it's falling "forward", and "forward" is of course relative to the direction the robot is facing.
I tried: `getBaseVelocity` but I believe this returns the velocity relative to the world frame, not the direction the robot is "facing"
I tried: `getLinkState` but I believe that does not work for '-1' as linkID, so I can't use it.
Do I need to do something like this?:
1. determine the orientation of the base via `getBasePositionAndOrientation`
2. determine the rotational velocity of base (relative to world)
3. some sort of matrix transform here to calculate the base's rotational velocity relative to the direction its facing
Is there an example anywhere?
Thank you!
PS: I found this example, but it feels overly complicated. https://github.com/bulletphysics/bullet ... ors.py#L33
Generally: I'm looking to know rotational velocity relative to world orientation.
Specifically: I have a "balancing robot", (a stick on two wheels), where the stick is the base link. I want to know how fast it's falling "forward", and "forward" is of course relative to the direction the robot is facing.
I tried: `getBaseVelocity` but I believe this returns the velocity relative to the world frame, not the direction the robot is "facing"
I tried: `getLinkState` but I believe that does not work for '-1' as linkID, so I can't use it.
Do I need to do something like this?:
1. determine the orientation of the base via `getBasePositionAndOrientation`
2. determine the rotational velocity of base (relative to world)
3. some sort of matrix transform here to calculate the base's rotational velocity relative to the direction its facing
Is there an example anywhere?
Thank you!
PS: I found this example, but it feels overly complicated. https://github.com/bulletphysics/bullet ... ors.py#L33