How to make sense of the continuous_state vector?

走远了吗. 提交于 2019-12-20 04:15:41

问题


Background

I am trying to balance a mobile inverted pendulum (i.e. segway).

For the simulation, I created a simple robot that involves a pole attached to a cylinder (wheel) through a revolute joint.

Question

After constructing my MIP plant, plant.num_positions() returns 8 and plant.num_velocities() returns 7, i.e. the total continuous_state size is 15

  1. How do I make sense of this large number of states?
  2. I suppose one of these represents the angle that the pole makes with the vertical. How do I find that?
  3. Also, why is num_positions() not equal to num_velocities()?

回答1:


By default, the urdf/sdf parser adds the system with a quaternion-based floating base. This floating base joint has 7 position variables (x,y,z + quaternion) and 6 velocities (xdot, ydot, zdot, + spatial velocity). You should use the multibody API to get the variable in the right order.

You can add a joint between the world link and your base (either in the urdf/sdf or in your code) to replace that implied floating joint with e.g. a prismatic joint at the base.

There are lots of examples of how to simulate it, in drake, but also at http://underactuated.mit.edu



来源:https://stackoverflow.com/questions/55711025/how-to-make-sense-of-the-continuous-state-vector

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!