Install and use homer_bringup package on Raspberry Pi
homer_bringup is a ROS 2 package for interfacing HomeR's hardware.
Success
Setting up this package on RPi only.
Install homer_bringup Package
mkdir -p ~/homer_ws/src # create a workspace
cd ~/homer_ws/src # navigate into `src/` under the workspace
git clone https://github.com/linzhanguca/homer_bringup.git # download package
cd ~/homer_ws # navigate to workspace root
rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO # let `rosdep` install missing dependencies
colcon build # build all packages in workspace
source ~/homer_ws/install/local_setup.bash # register all resources in the current workspace
echo "source ~/homer_ws/install/local_setup.bash" >> ~/.bashrc # auto register
Tip
adding source ~/homer_ws/install/local_setup.bash to the end of ~/.bashrc file, so that the homer_bringup will be always available.
Usage
- To only start the
homer_interfacenode:
- To launch a collection of nodes
Tip
You can start driving HomeR using a gamepad if using ros2 launch ... command.
- Test drive with keyboard
Open a separate terminal window (can be one on the server):
Debriefing
pico_interface
The core of homer_bringup package is the pico_interface node which bridges the gap between the motion control and ROS management.
It does the following jobs.
- Sets up the communication between RPi and Pico.
- Subscribes to the ROS topic:
/cmd_veland transmitslinear.xandangular.zvalues to Pico as the reference/target linear and angular velocity for HomeR. - Receives HomeR's motion status including the estimated linear and angular velocity based on the encoder data, accelerometer data (acceleration on 3 axes) and gyroscope data (angular velocity on 3 axes).
- Constantly updates HomeR's pose using the encoder estimated linear and angular velocity.
- Publishes
Odometrymessage under the/homer/odomtopic, which contains the pose and velocity information. - Publishes
Imumessage under the/homer/imutopic, which contains the data from the MPU6050 sensor.
The duties of pico_interface node can be illustrated by the following graph

homer_launch.py
homer_bringup provides homer_launch.py for the convenience to launch a collection of useful nodes and frame transformations alongside the pico_interface node.
The launch file's duties are listed below.
- A
teleop_twist_joy_nodefrom theteleop_twist_joypackage, which publishes the/cmd_veltopic. - A customized
rplidar_compositionnode (fromrplidar_rospackage) publishing the/scantopic. - A static transformation between
base_linkframe andlidar_linkframe (will be used for SLAM later). - A static transformation between the
base_linkframe andbase_footprintframe (will be used for navigation later). - A static transformation between the
base_linkframe andimu_linkframe. - An Extended Kalman Filter node from
robot_localizationpackage to fuse the encoder data and the IMU data. This node spits out more accurate pose estimation and broadcast the transformations between theodomframe and thebase_linkframe.
The launch file will construct a more complex system.
Use rqt_graph command to view it.