How to transfer base velocities to a differential drive robot? #121
-
I am running Stretch Hello Robot example. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You did not specify what # Compute velocity and integrate it into next configuration
velocity = solve_ik(configuration, tasks, dt, solver=solver)
configuration.integrate_inplace(velocity, dt) To understand the structure of this vector, let's check: In [2]: robot.nv
Out[7]: 17 The Stretch robot itself has 14 actuated joints (checked e.g. from the URDF file directly, or from the robot description index here). On top of this we added a planar joint at this step: robot = load_robot_description(
"stretch_description", root_joint=pin.JointModelPlanar()
) The planar joint adds three velocity coordinates to velocity vectors. The structure of the velocity vector is then:
If I understand correctly your v = np.linalg.norm(velocity[0:2])
w = velocity[2] Hoping this helps! |
Beta Was this translation helpful? Give feedback.
You did not specify what$v$ and $w$ are but I'm guessing $v$ is the linear (longitudinal) velocity and $w$ is the angular velocity of the differential-drive model. In that case you can read them straightaway from the
velocity
vector that is computed at these lines of the example:To understand the structure of this vector, let's check:
The Stretch robot itself has 14 actuated joints (checked e.g. from the URDF file directly, or from the robot description index here). On to…