Warning
This code is currently untested on hardware but parts of the code have been used on hardware in the past
Here are some important resources for Rover 2 month
Pin assignments can be easily updated to suit different hardware configurations.
| Pin | Function |
|---|---|
Make sure to source your ROS2 setup script
Important
It is a good idea to run rosdep in the root of your workspace before building to ensure that no packages are missing
rosdep install -i --from-path src --rosdistro humble -yRun this from the root of your workspace (like ros2_ws)
colcon build --packages-select [packageName]source install/setup.bashros2 run [package_name] talkerLike this:
ros2 run py_pubsub talkerThe output may look like this:
[info] [minimal_publisher]: publishing: "hello world: 0"
[info] [minimal_publisher]: publishing: "hello world: 1"
[info] [minimal_publisher]: publishing: "hello world: 2"
[info] [minimal_publisher]: publishing: "hello world: 3"
[info] [minimal_publisher]: publishing: "hello world: 4"ros2 run [package_name] listenerLike:
ros2 run py_pubsub listenerThe output may look like this:
[INFO] [minimal_subscriber]: I heard: "Hello World: 10"
[INFO] [minimal_subscriber]: I heard: "Hello World: 11"
[INFO] [minimal_subscriber]: I heard: "Hello World: 12"
[INFO] [minimal_subscriber]: I heard: "Hello World: 13"
[INFO] [minimal_subscriber]: I heard: "Hello World: 14"This package takes takes the data received from the Pico over serial and publishes it. This package requires the device to be connected via serial or it will error.