Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into humble
Browse files Browse the repository at this point in the history
  • Loading branch information
sudo-michael committed Oct 22, 2024
2 parents 2ff3057 + 76ebf22 commit 111f0a7
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# ROS2 Examples
[Installation](#installation) | [Misc tips](#tips--other-resources)

# Installation
```
colcon build --symlink-install
Expand All @@ -13,6 +15,14 @@ You should already have Docker and VSCode with the remote containers plugin inst
* [vscode](https://code.visualstudio.com/)
* [vscode remote containers plugin](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)

To use docker with sudo and connect to the container with VS code following the [postinstall instructions](https://docs.docker.com/engine/install/linux-postinstall/).

`sudo groupadd docker`

`sudo usermod -aG docker $USER`

`newgrp docker`

## Open it in vscode

Now that you've cloned your repo onto your computer, you can open it in VSCode (File->Open Folder).
Expand All @@ -31,3 +41,21 @@ VSCode will build the dockerfile inside of `.devcontainer` for you. If you open

![template_container](https://user-images.githubusercontent.com/6098197/91332895-adbf1500-e781-11ea-8afc-7a22a5340d4a.png)

# Tips / other resources
## Rosbags
Rosbags are used to record ROS data.

[Basic tutorial](https://docs.ros.org/en/humble/Tutorials/Beginner-CLI-Tools/Recording-And-Playing-Back-Data/Recording-And-Playing-Back-Data.html) | [Advanced tutorials](https://docs.ros.org/en/humble/Tutorials/Advanced.html) | [Repo](https://github.com/ros2/rosbag2)

### Tools for working with rosbags (and ROS2 in general)
- PlotJuggler: [Website](https://plotjuggler.io/) | [Repo](https://github.com/facontidavide/PlotJuggler)
- This [Medium post](https://medium.com/evocargo/9-awesome-open-source-tools-to-manage-your-rosbags-b350fdb651c8) contains some other tools (potentially outdated)

### Recording and playing back data using rosbags and plotjuggler
1. `sudo apt install ros-${ROS_DISTRO}-plotjuggler-ros`
2. Record the desired topics to some output folder: `ros2 bag record <topics> -o <output_folder>`
- Example: `ros2 bag record /tf /cmd_vel -o test`
- A default file name will be used if the `-o` option is not used
- **Warning**: Using `ros2 bag record --all` will usually result in _gigantic_ file sizes
3. `ros2 run plotjuggler plotjuggler`
4. Load data or stream from current topics
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions src/controller/launch/experiment.launch.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<<<<<<< HEAD
import os
from ament_index_python import get_package_share_directory
=======
>>>>>>> origin/main
from launch import LaunchDescription
from launch_ros.actions import Node

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 111f0a7

Please sign in to comment.