|
Mujoco KDL Wrapper
0.5.1
MuJoCo + KDL bridge for robot kinematics and dynamics
|
Public Member Functions | |
| __init__ (self, mjk.Env env, mjk.Robot robot) | |
| kdl.Frame | tcp (self) |
| float | elbow_height (self) |
| None | restart (self) |
| None | control (self) |
| None | measure (self) |
| bool | done (self) |
| bool | finished (self) |
Public Attributes | |
| env | |
| robot = env, robot | |
| chain = robot.kdl_chain() | |
| fk = kdl.ChainFkSolverPos_recursive(self.chain) | |
| achd_approach = kdl.ChainHdSolver_Vereshchagin(self.chain, root_acc, 6) | |
| achd = kdl.ChainHdSolver_Vereshchagin(self.chain, root_acc, 5) | |
| rnea = kdl.ChainIdSolver_RNE(self.chain, kdl.Vector(0.0, 0.0, gravity_z)) | |
| alpha6 = alpha_all() | |
| alpha5 = alpha_no_linear_z() | |
| list | f_ext = [kdl.Wrench.Zero() for _ in range(segments)] |
| list | no_wrench = [kdl.Wrench.Zero() for _ in range(segments)] |
| table_geom = env.model.geom("top").id | |
| tcp_site = env.model.site(TCP_SITE).id | |
| target = kdl.Frame(self.tracked.M, self.tracked.p + kdl.Vector(MOVE_X, 0.0, 0.0)) | |
| kdl.Frame | tracked = self.tcp() |
| int | phase = APPROACH |
| err_prev = None | |
| int | steps = 0 |
| touchdown = math.nan | |
| float | elbow_min = self.elbow_height() |
| int | contact_steps = 0 |
| float | reaction_sum = 0.0 |
| int | reaction_count = 0 |
The ACHD controller and the press measurement; restart() replays it from the current pose.
Definition at line 152 of file ex_achd_table_slide.py.
| ex_achd_table_slide.Slide.__init__ | ( | self, | |
| mjk.Env | env, | ||
| mjk.Robot | robot ) |
Definition at line 155 of file ex_achd_table_slide.py.
| None ex_achd_table_slide.Slide.control | ( | self | ) |
Definition at line 196 of file ex_achd_table_slide.py.
References ex_achd_pick_place.Achd.achd, achd, achd_approach, alpha5, alpha6, ex_achd_table_slide.clamp_abs(), env, mj_kdl::ResetContext.env, ex_achd_pick_place.Achd.err_prev, err_prev, f_ext, ex_achd_pick_place.Achd.fk, fk, ex_achd_table_slide.jnt(), no_wrench, phase, ex_achd_pick_place.Achd.rnea, rnea, ex_achd_pick_place.Achd.robot, robot, steps, target, and tracked.
| bool ex_achd_table_slide.Slide.done | ( | self | ) |
Definition at line 260 of file ex_achd_table_slide.py.
References finished(), phase, and steps.
| float ex_achd_table_slide.Slide.elbow_height | ( | self | ) |
Definition at line 181 of file ex_achd_table_slide.py.
References env, and mj_kdl::ResetContext.env.
Referenced by measure().
| bool ex_achd_table_slide.Slide.finished | ( | self | ) |
Definition at line 263 of file ex_achd_table_slide.py.
Referenced by done().
| None ex_achd_table_slide.Slide.measure | ( | self | ) |
Advances the phase after a step and samples the checks.
Definition at line 243 of file ex_achd_table_slide.py.
References ex_achd_table_slide.contact_normal_force(), contact_steps, elbow_height(), elbow_min, env, mj_kdl::ResetContext.env, phase, reaction_count, reaction_sum, ex_achd_table_slide.site_sink_speed(), steps, table_geom, target, tcp_site, mj_kdl::Robot.tcp_site, mj_kdl::ToolFrameSpec.tcp_site, touchdown, ex_achd_table_slide.touches(), and tracked.
| None ex_achd_table_slide.Slide.restart | ( | self | ) |
Definition at line 184 of file ex_achd_table_slide.py.
References env, and mj_kdl::ResetContext.env.
| kdl.Frame ex_achd_table_slide.Slide.tcp | ( | self | ) |
Definition at line 176 of file ex_achd_table_slide.py.
References ex_achd_pick_place.Achd.fk, fk, ex_achd_table_slide.jnt(), ex_achd_pick_place.Achd.robot, and robot.
| ex_achd_table_slide.Slide.achd = kdl.ChainHdSolver_Vereshchagin(self.chain, root_acc, 5) |
Definition at line 162 of file ex_achd_table_slide.py.
Referenced by control().
| ex_achd_table_slide.Slide.achd_approach = kdl.ChainHdSolver_Vereshchagin(self.chain, root_acc, 6) |
Definition at line 161 of file ex_achd_table_slide.py.
Referenced by control().
| ex_achd_table_slide.Slide.alpha5 = alpha_no_linear_z() |
Definition at line 167 of file ex_achd_table_slide.py.
Referenced by control().
| ex_achd_table_slide.Slide.alpha6 = alpha_all() |
Definition at line 166 of file ex_achd_table_slide.py.
Referenced by control().
| ex_achd_table_slide.Slide.chain = robot.kdl_chain() |
Definition at line 157 of file ex_achd_table_slide.py.
| int ex_achd_table_slide.Slide.contact_steps = 0 |
Definition at line 192 of file ex_achd_table_slide.py.
Referenced by measure().
| float ex_achd_table_slide.Slide.elbow_min = self.elbow_height() |
Definition at line 191 of file ex_achd_table_slide.py.
Referenced by measure().
| ex_achd_table_slide.Slide.env |
Definition at line 156 of file ex_achd_table_slide.py.
Referenced by control(), elbow_height(), measure(), and restart().
| ex_achd_table_slide.Slide.err_prev = None |
Definition at line 188 of file ex_achd_table_slide.py.
Referenced by control().
| list ex_achd_table_slide.Slide.f_ext = [kdl.Wrench.Zero() for _ in range(segments)] |
Definition at line 169 of file ex_achd_table_slide.py.
Referenced by control().
| ex_achd_table_slide.Slide.fk = kdl.ChainFkSolverPos_recursive(self.chain) |
Definition at line 158 of file ex_achd_table_slide.py.
| ex_achd_table_slide.Slide.no_wrench = [kdl.Wrench.Zero() for _ in range(segments)] |
Definition at line 170 of file ex_achd_table_slide.py.
Referenced by control().
| ex_achd_table_slide.Slide.phase = APPROACH |
Definition at line 187 of file ex_achd_table_slide.py.
Referenced by control(), done(), finished(), and measure().
| int ex_achd_table_slide.Slide.reaction_count = 0 |
Definition at line 194 of file ex_achd_table_slide.py.
Referenced by measure().
| float ex_achd_table_slide.Slide.reaction_sum = 0.0 |
Definition at line 193 of file ex_achd_table_slide.py.
Referenced by measure().
| ex_achd_table_slide.Slide.rnea = kdl.ChainIdSolver_RNE(self.chain, kdl.Vector(0.0, 0.0, gravity_z)) |
Definition at line 165 of file ex_achd_table_slide.py.
Referenced by control().
| ex_achd_table_slide.Slide.robot = env, robot |
Definition at line 156 of file ex_achd_table_slide.py.
| int ex_achd_table_slide.Slide.steps = 0 |
Definition at line 189 of file ex_achd_table_slide.py.
Referenced by control(), done(), finished(), and measure().
| ex_achd_table_slide.Slide.table_geom = env.model.geom("top").id |
Definition at line 171 of file ex_achd_table_slide.py.
Referenced by measure().
| ex_achd_table_slide.Slide.target = kdl.Frame(self.tracked.M, self.tracked.p + kdl.Vector(MOVE_X, 0.0, 0.0)) |
Definition at line 174 of file ex_achd_table_slide.py.
| ex_achd_table_slide.Slide.tcp_site = env.model.site(TCP_SITE).id |
Definition at line 172 of file ex_achd_table_slide.py.
Referenced by measure().
| ex_achd_table_slide.Slide.touchdown = math.nan |
Definition at line 190 of file ex_achd_table_slide.py.
Referenced by measure().
| kdl.Frame ex_achd_table_slide.Slide.tracked = self.tcp() |
Definition at line 186 of file ex_achd_table_slide.py.