Both sides previous revisionPrevious revisionNext revision | Previous revision |
tutorials:intermediate:moveit [2016/03/07 19:55] – [Accessing the robot state] gkazhoya | tutorials:intermediate:moveit [2016/07/27 14:36] (current) – [Initializing cram_moveit] mpomarlan |
---|
| |
<code lisp> | <code lisp> |
(roslisp:start-ros-node NODE-NAME) | (roslisp-utilities:startup-ros) |
(cram-moveit:init-moveit-bridge) | (cram-moveit:init-moveit-bridge) |
</code> | </code> |
and look in the RViz window for a reaction. After some planning time, usually a fraction of a second, the robot's right wrist will move to the requested location. | and look in the RViz window for a reaction. After some planning time, usually a fraction of a second, the robot's right wrist will move to the requested location. |
| |
The parameters to move-link-pose are, in order, a link name, a planning group, and a pose-stamped object representing the pose to move to. The pose is something you will typically define yourself in your programs; either hard-coded (as in this tutorial) or through some generation process like [[tutorials:beginner:location_designators|location designator resolution]]. | The parameters to ''move-link-pose'' are, in order, a link name, a planning group, and a ''pose-stamped'' object representing the pose to move to. The pose is something you will typically define yourself in your programs; either hard-coded (as in this tutorial) or through some generation process like [[tutorials:beginner:location_designators|location designator resolution]]. |
| |
Link names and planning groups are found in the *.srdf file for the robot you're working with. For this tutorial, this is the default *.srdf file in the pr2_moveit_config package. You can run MoveIt! with other robots as well ([[http://moveit.ros.org/wiki/PR2/Setup_Assistant/Quick_Start|here's a tutorial]] on how to configure it, even if it shows another configuration for the PR2), in which case you'll just have to use the *.srdf defined for that robot. Link names are self explanatory, and defined in the robot definition files. Planning groups are defined in the *.srdf, and represent kinematic chains on the robot: lists of links that will typically move together to achieve some goal. | Link names and planning groups are found in the ''*.srdf'' file for the robot you're working with. For this tutorial, this is the default ''*.srdf'' file in the ''pr2_moveit_config'' package. You can run MoveIt! with other robots as well ([[http://moveit.ros.org/wiki/PR2/Setup_Assistant/Quick_Start|here's a tutorial]] on how to configure it, even if it shows another configuration for the PR2), in which case you'll just have to use the ''*.srdf'' defined for that robot. Link names are self explanatory, and defined in the robot definition files. Planning groups are defined in the ''*.srdf'', and represent kinematic chains on the robot: lists of links that will typically move together to achieve some goal. |
| |
Sometimes you just want to know a trajectory between a robot's state and some goal, but you don't want to also execute the motion. For such situations, you can run something like: | Sometimes you just want to know a trajectory between a robot's state and some goal, but you don't want to also execute the motion. For such situations, you can run something like: |
<code lisp> | <code lisp> |
(multiple-value-bind (start-robot-state-p planned-trajectory-p) | (multiple-value-bind (start-robot-state-p planned-trajectory-p) |
(plan-link-movement "r_wrist_roll_link" "right_arm" tuti:*pose-right*) | (plan-link-movement "r_wrist_roll_link" "right_arm" tuti:*pose-right*) |
(setf tuti:*start-robot-state* start-robot-state-p) | (setf tuti:*start-robot-state* start-robot-state-p) |
(setf tuti:*planned-trajectory* planned-trajectory-p)) | (setf tuti:*planned-trajectory* planned-trajectory-p)) |
</code> | </code> |
| |
1.5 | 1.5 |
t | t |
(roslisp:make-msg "moveit_msgs/Constraints")) | :path-constraints-msg (roslisp:make-msg "moveit_msgs/Constraints")) |
</code> | </code> |
| |