Skip to content

Commit 040f399

Browse files
Improvements to the ROS2 Navigation menu, examples, and overview pages. (#34)
* Renamed examples1-10 to files with their correct names. Added a placeholder for a Sensors tutorial, and funmap links to the README awaiting a plugin that embeds github links. * Pointcloud manipulation was a Realsense Camera example, changed it back. * Renamed gazebo_basics to stretch_simulation. Updated gamepad teleop link to use 0.3 in teleoperating_stretch. * Updated links to example_#.md and the title of all the examples to match their content where they were wrong. * README.md is now the overview/getting started page on the docs * Fixed the include-markdown embed for stretch_simulation and funmap * Added content to writing nodes * Gamepad teleop uses stretch_driver instead of stretch_body * Created a sub-menu for ROS2 Basics * Added a Stretch Simulation tutorial * Changed link to a relative one * Merged perception tutorial into rviz_baiscs. Merged aruco_locator into aruco_marker_detection. Added back the Getting Started navigation * Added a tutorial on ROS_DOMAIN_ID
1 parent 2ccee66 commit 040f399

26 files changed

Lines changed: 1837 additions & 671 deletions

mkdocs_rt.yml

Lines changed: 37 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -83,37 +83,45 @@ extra:
8383

8484
nav:
8585
- Getting Started: ./getting_started.md
86-
- Motion Commands: ./jogging.md
87-
- Robot Drivers: ./robot_drivers.md
88-
# - Writing Nodes: ./writing_nodes.md # TODO
89-
- Navigation with Nav2:
86+
- ROS2 Basics:
87+
- Creating Packages & Nodes: ./writing_nodes.md
88+
- Introduction to ROS2 Client (rclpy): ./intro_to_ros2.md
89+
- Introduction to HelloNode: ./intro_to_hellonode.md
90+
- Simulation Tutorial: ./stretch_simulation.md
91+
- Teleoperation: ./teleoperating_stretch.md
92+
- RViz Tutorial: ./rviz_basics.md
93+
- Follow Joint Trajectory & Joint States: ./follow_joint_trajectory.md
94+
- Motion Commands via hello_utils: ./jogging.md
95+
- Robot Driver: ./robot_drivers.md
96+
- Twist Control: ./twist_control.md
97+
- Sensors Tutorial: ./sensors_tutorial.md
98+
- Nav Stack Tutorial:
9099
- Overview: ./navigation_overview.md
91100
- Nav2 Basics: ./navigation_stack.md
92101
- Nav2 Simple Commander: ./navigation_simple_commander.md
93-
# - Manipulation with MoveIt2: # TODO
94-
# - MoveIt Basics: ./moveit_basics.md # TODO
95-
# - MoveIt with RViz: ./moveit_rviz_demo.md # TODO
96-
# - MoveGroup C++ API: ./moveit_movegroup_demo.md # TODO
97-
- FUNMAP: https://github.com/hello-robot/stretch_ros2/tree/humble/stretch_funmap#overview
98-
# - Mapping: ./writing_nodes.md #TODO
99-
# - Navigation: ./writing_nodes.md #TODO
100-
# - Manipulation: ./writing_nodes.md # TODO
101-
- Perception: ./perception.md
102+
- Perception Tutorial: ./perception.md
103+
- Deep Perception: ./deep_perception.md
104+
- ArUco Markers: ./aruco_marker_detection.md
105+
- Offloading Computation Tutorial: ./remote_compute.md
106+
- Autonomy Demos:
107+
- Hello World: ./demo_hello_world.md
108+
- Grasp Object: ./demo_grasp_object.md
109+
- Handover Object: ./demo_handover_object.md
110+
- Open Drawer: ./demo_open_drawer.md
111+
- Surface Cleaning: ./demo_surface_cleaning.md
112+
- FUNMAP Tutorial: ./funmap_tutorial.md
102113
- Examples:
103-
- Move Stretch with Twist Controller: ./example_1.md
104-
- Trajectory Control: ./follow_joint_trajectory.md
114+
- Voice Teleop: ./voice_teleop.md
115+
- Speech to Text: ./speech_to_text.md
116+
- Lidar Based Sensing: ./lidar_filtering.md
117+
- Custom RViz Marker: ./rviz_markers.md
118+
- Effort Value Plotting: ./joint_effort_plotting.md
119+
- Tf2 Listener and Broadcaster: ./tf2_transforms.md
120+
- Realsense Camera: ./realsense_camera.md
121+
- Align to ArUco Tutorial: ./align_to_aruco.md
122+
- ArUco Locator: ./aruco_marker_detection#aruco-locator-example
123+
- Joint States: ./joint_states.md
124+
- Collision Avoidance: ./collision_avoidance.md
105125
- Obstacle Avoidance: ./obstacle_avoider.md
106-
- Collision Avoidance: ./example_3.md
107-
- Rviz Markers: ./example_4.md
108-
- Offloading Computation: ./remote_compute.md
109-
- Align to ArUco: ./ros2/align_to_aruco.md
110-
- ArUco Locator: ./example_12.md
111-
- Joints:
112-
- Joint States: ./example_5.md
113-
- Static Transformations: ./example_10.md
114-
- Joint Effort: ./example_6.md
115-
- Deep Perception: ./ros2/deep_perception.md
116-
- Filter Laser Scans: ./example_2.md
117-
- Realsense Camera: ./example_7.md
118-
- Microphones: ./example_8.md
119-
- Voice Teleop: ./example_9.md
126+
127+

ros2/README.md

Lines changed: 42 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
![](../images/banner.png)
2-
# Tutorial Track: Stretch ROS 2 (Beta)
2+
# Tutorial Track: Stretch ROS 2
3+
4+
This tutorial series covers writing ROS 2 software for Stretch. ROS 2 programs can be written in a variety of programming languages, but this series uses Python. We'll write programs that enable Stretch to navigate autonomously in its environment, manipulate objects with Stretch's gripper, perceive its environment, and much more.
5+
6+
## Prerequisites
7+
8+
Ensure that:
9+
10+
1. Your Stretch has the latest robot distribution installed
11+
- These tutorials were written for the latest robot distribution. Take a look at the [Distributions & Roadmap](../../software/distributions/) guide to identify your current distribution and upgrade if necessary.
12+
2. You have gone through the [Getting Started Tutorials](../../getting_started/hello_robot/)
13+
- If you've never developed with Stretch before or are new to programming, check out the [Developing with Stretch](../../developing/basics/) tutorial series. In particular, the [Using ROS 2 with Stretch](#TODO) tutorial from that series is a good resource for those new to ROS 2.
314

415
## Robot Operating System 2 (ROS 2)
516

@@ -16,44 +27,42 @@ This tutorial track is for users looking to get familiar with programming Stretc
1627

1728
| | Tutorial | Description |
1829
|--|---------------------------------------------------------------------------------|----------------------------------------------------|
19-
| 1 | [Getting Started](getting_started.md) | Setup instructions for ROS 2 on Stretch|
20-
| 2 | [Introduction to ROS 2](intro_to_ros2.md.md) | Explore the client library used in ROS2 |
21-
| 3 | [Introduction to HelloNode](intro_to_hellonode.md) | Explore the Hello Node class to create a ROS2 node for Stretch |
22-
| 4 | [Teleoperating Stretch](teleoperating_stretch.md) | Control Stretch with a Keyboard or a Gamepad controller. |
23-
| 5 | [Internal State of Stretch](internal_state_of_stretch.md) | Monitor the joint states of Stretch. |
24-
| 6 | [RViz Basics](rviz_basics.md) | Visualize topics in Stretch. |
25-
| 7 | [Nav2 Stack](navigation_overview.md) | Motion planning and control for mobile base. |
26-
| 8 | [Follow Joint Trajectory Commands](follow_joint_trajectory.md) | Control joints using joint trajectory server. |
27-
| 9 | [Perception](perception.md) | Use the Realsense D435i camera to visualize the environment. |
28-
| 10 | [ArUco Marker Detection](aruco_marker_detection.md) | Localize objects using ArUco markers. |
29-
| 11 | [ReSpeaker Microphone Array](respeaker_mic_array.md) | Learn to use the ReSpeaker Microphone Array. |
30-
| 12 | [FUNMAP](https://github.com/hello-robot/stretch_ros2/tree/humble/stretch_funmap) | Fast Unified Navigation, Manipulation and Planning. |
31-
<!--| 5 | [MoveIt2 Basics](moveit_basics.md) | Motion planning and control for the arm using MoveIt. |
32-
| 6 | [MoveIt2 with Rviz](moveit_rviz_demo.md) | Motion planning and control for the arm using MoveIt. |
33-
| 7 | [MoveIt2 MoveGroup C++ API](moveit_movegroup_demo.md) | Motion planning and control for the arm using MoveIt. |
34-
| 13 | [ROS testing](coming_soon.md) | Write ROS system tests for introspection. |
35-
| 14 | [Other Nav Stack Features](coming_soon.md) | Advanced features for Nav 2. | -->
30+
| 1 | [Creating your own package, launch files, nodes](writing_nodes.md) | Setup instructions for ROS 2 on Stretch|
31+
| 2 | [Simulation Tutorial](stretch_simulation.md) | Explore the client library used in ROS2 |
32+
| 3 | [Teleoperating Stretch](teleoperating_stretch.md) | Control Stretch with a Keyboard or a Gamepad controller. |
33+
| 4 | [RViz Basics](rviz_basics.md) | Visualize topics in Stretch. |
34+
| 5 | [Follow Joint Trajectory Commands](follow_joint_trajectory.md) | Control joints using joint trajectory server. |
35+
| 6 | [Introduction to HelloNode](intro_to_hellonode.md) | Explore the Hello Node class to create a ROS2 node for Stretch |
36+
| 7 | [Robot Driver](robot_drivers.md) | ROS2 Wrapper for the python API. |
37+
| 8 | [Twist Control](twist_control.md) | Using Twist messages to control the mobile base. |
38+
| 9 | [Sensors](sensors_tutorial.md) | Stretch sensors including the ReSpeaker microphone array, IMU, bump sensors, and cliff sensors. |
39+
| 10 | [Nav2 Stack](navigation_overview.md) | Motion planning and control for mobile base. |
40+
| 11 | [Perception](perception.md) | Use the Realsense D435i camera to visualize the environment. |
41+
| 12 | [Deep Perception](deep_perception.md) | Perception using Deep Learning. |
42+
| 13 | [ArUco Marker Detection](aruco_marker_detection.md) | Localize objects using ArUco markers. |
43+
| 14 | [Offloading Computation Tutorial](remote_compute.md) | Offloading computationally intensive processes. |
44+
| 15 | [Avoiding Race Conditions and Deadlocks](avoiding_deadlocks_race_conditions.md) | Learn how to avoid Race Conditions and Deadlocks |
45+
| 16 | [Autonomy Demos](demo_hello_world.md) | A few demos showcasing Stretch's autonomous capabilities. |
46+
| 17 | [FUNMAP](https://github.com/hello-robot/stretch_ros2/tree/humble/stretch_funmap) | Fast Unified Navigation, Manipulation and Planning. |
47+
48+
3649

3750
## Other Examples
3851
To help get you started on your software development, here are examples of nodes to have Stretch perform simple tasks.
3952

4053

4154
| | Tutorial | Description |
4255
|---|-------------------------------------------------|----------------------------------------------------|
43-
| 1 | [Mobile Base Velocity Control](example_1.md) | Use a python script that sends velocity commands. |
44-
| 2 | [Filter Laser Scans](example_2.md) | Publish new scan ranges that are directly in front of Stretch.|
45-
| 3 | [Mobile Base Collision Avoidance](example_3.md) | Stop Stretch from running into a wall.|
46-
| 4 | [Give Stretch a Balloon](example_4.md) | Create a "balloon" marker that goes where ever Stretch goes.|
47-
| 5 | [Print Joint States](example_5.md) | Print the joint states of Stretch.|
48-
| 6 | [Store Effort Values](example_6.md) | Print, store, and plot the effort values of the Stretch robot.|
49-
| 7 | [Capture Image](example_7.md) | Capture images from the RealSense camera data.|
50-
| 8 | [Voice to Text](example_8.md) | Interpret speech and save transcript to a text file.|
51-
| 9 | [Voice Teleoperation of Base](example_9.md) | Use speech to teleoperate the mobile base.|
52-
| 10 | [Tf2 Broadcaster and Listener](example_10.md) | Create a tf2 broadcaster and listener.|
53-
| 11 | [ArUco Tag Locator](example_12.md) | Actuate the head to locate a requested ArUco marker tag and return a transform.|
56+
| 1 | [Voice to Text](speech_to_text.md) | Interpret speech and save transcript to a text file.|
57+
| 2 | [Voice Teleoperation of Base](voice_teleop.md) | Use speech to teleoperate the mobile base.|
58+
| 3 | [Filter Laser Scans](lidar_filtering.md) | Publish new scan ranges that are directly in front of Stretch.|
59+
| 4 | [Give Stretch a Balloon](rviz_markers.md) | Create a "balloon" marker that goes where ever Stretch goes.|
60+
| 5 | [Align to ArUco](align_to_aruco.md) | Detect ArUco fiducials using OpenCV and align to them.|
61+
| 6 | [ArUco Tag Locator](aruco_locator.md) | Actuate the head to locate a requested ArUco marker tag and return a transform.|
62+
| 7 | [Print Joint States](joint_states.md) | Print the joint states of Stretch.|
63+
| 8 | [Store Effort Values](joint_effort_plotting.md) | Print, store, and plot the effort values of the Stretch robot.|
64+
| 9 | [Tf2 Broadcaster and Listener](tf2_transforms.md) | Create a tf2 broadcaster and listener.|
65+
| 10 | [Capture Image](realsense_camera.md) | Capture images from the RealSense camera data.|
66+
| 11 | [Mobile Base Collision Avoidance](collision_avoidance.md) | Stop Stretch from running into a wall.|
5467
| 12 | [Obstacle Avoider](obstacle_avoider.md) | Avoid obstacles using the planar lidar. |
55-
| 13 | [Align to ArUco](align_to_aruco.md) | Detect ArUco fiducials using OpenCV and align to them.|
56-
| 14 | [Deep Perception](deep_perception.md) | Use YOLOv5 to detect 3D objects in a point cloud.|
57-
| 15 | [Avoiding Race Conditions and Deadlocks](avoiding_deadlocks_race_conditions.md) | Learn how to avoid Race Conditions and Deadlocks |
5868
<!--| 11 | [PointCloud Transformation](example_11.md) | Convert PointCloud2 data to a PointCloud and transform to a different frame.| -->
59-

ros2/align_to_aruco.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Stretch comes preconfigured to identify ArUco markers. The ROS node that enables
102102

103103
## Computing Transformations
104104

105-
If you have not already done so, now might be a good time to review the [tf listener](https://docs.hello-robot.com/latest/ros2/example_10/) tutorial. Go on, we can wait...
105+
If you have not already done so, now might be a good time to review the [tf listener](https://docs.hello-robot.com/latest/ros2/tf2_transforms/) tutorial.
106106
Now that we know how to program stretch to return the transform between known reference frames, we can use this knowledge to compute the transform between the detected marker and the robot's base_link. From its current pose, for Stretch to align itself in front of the marker, we need to command it to reach there. But even before that, we need to program Stretch to know the goal pose. We define the goal pose to be 0.75 meter outward from the marker in the marker negative y-axis (Green axis). This is easier to visualize through the figure below.
107107

108108
<p align="center">

0 commit comments

Comments
 (0)