You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
3.0 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. # MoveIt! Basics
  2. <!--
  3. ## MoveIt! on Stretch
  4. To run MoveIt with the actual hardware, (assuming `stretch_driver` is already running) simply run
  5. ```bash
  6. roslaunch stretch_moveit_config move_group.launch
  7. ```
  8. This will run all of the planning capabilities, but without the setup, simulation and interface that the above demo provides. To create plans for the robot with the same interface as the offline demo, you can run
  9. ```bash
  10. roslaunch stretch_moveit_config moveit_rviz.launch
  11. ``` -->
  12. ## MoveIt! Without Hardware
  13. To begin running MoveIt! on stretch, run the demo launch file. This doesn't require any simulator or robot to run.
  14. ```{.bash .shell-prompt}
  15. roslaunch stretch_moveit_config demo.launch
  16. ```
  17. This will bring up an RViz instance where you can move the robot around using [interactive markers](http://wiki.ros.org/rviz/Tutorials/Interactive%20Markers%3A%20Getting%20Started) and create plans between poses. You can reference the bottom gif as a guide to plan and execute motion.
  18. <p align="center">
  19. <img src="https://raw.githubusercontent.com/hello-robot/stretch_tutorials/noetic/images/moveit.gif"/>
  20. </p>
  21. Additionally, the demo allows a user to select from the three groups, `stretch_arm`, `stretch_gripper`, `stretch_head` to move. A few notes to be kept in mind:
  22. * Pre-defined start and goal states can be specified in Start State and Goal State drop-downs in the Planning tab of the Motion Planning RViz plugin.
  23. * *stretch_gripper* group does not show markers and is intended to be controlled via the joints tab that is located on the very right of the Motion Planning Rviz plugin.
  24. * When planning with *stretch_head* group make sure you select *Approx IK Solutions* in the Planning tab of the Motion Planning RViz plugin.
  25. <p align="center">
  26. <img src="https://raw.githubusercontent.com/hello-robot/stretch_tutorials/noetic/images/moveit_groups.gif"/>
  27. </p>
  28. ## Running Gazebo with MoveIt! and Stretch
  29. To run in Gazebo, execute:
  30. ```{.bash .shell-prompt}
  31. roslaunch stretch_gazebo gazebo.launch
  32. ```
  33. Then, in a new terminal, execute:
  34. ```{.bash .shell-prompt}
  35. roslaunch stretch_core teleop_twist.launch twist_topic:=/stretch_diff_drive_controller/cmd_vel linear:=1.0 angular:=2.0 teleop_type:=keyboard
  36. ```
  37. In a separate terminal, launch:
  38. ```{.bash .shell-prompt}
  39. roslaunch stretch_moveit_config demo_gazebo.launch
  40. ```
  41. This will launch a Rviz instance that visualizes the joints with markers and an empty world in Gazebo with Stretch and load all the controllers. There are pre-defined positions for each joint group for demonstration purposes. There are three joint groups, namely stretch_arm, stretch_gripper and stretch_head that can be controlled individually via the Motion Planning Rviz plugin. Start and goal positions for joints can be selected similarly to [this moveit tutorial](https://ros-planning.github.io/moveit_tutorials/doc/quickstart_in_rviz/quickstart_in_rviz_tutorial.html#choosing-specific-start-goal-states).
  42. <p align="center">
  43. <img src="https://raw.githubusercontent.com/hello-robot/stretch_tutorials/noetic/images/gazebo_moveit.gif"/>
  44. </p>