# Building PX4-ROS2 bridge on hardware? (Pixhawk 4)

**URL:** <https://discuss.px4.io/t/building-px4-ros2-bridge-on-hardware-pixhawk-4/24266>\
**Category:** ROS 1 / ROS 2\
**Created:** [September 20, 2021, 8:51pm UTC](https://discuss.px4.io/t/building-px4-ros2-bridge-on-hardware-pixhawk-4/24266 "2021-09-20T20:51:49Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![nsimon](https://discuss.px4.io/user_avatar/discuss.px4.io/nsimon/32/8784_2.png) [@nsimon](https://discuss.px4.io/u/nsimon)\
**Post date:** [September 22, 2021, 3:51am UTC](https://discuss.px4.io/t/building-px4-ros2-bridge-on-hardware-pixhawk-4/24266/2 "2021-09-22T03:51:57Z")

</div>

(SOLVED) with reference to [Micrortps\_client does not receive uorb message](https://discuss.px4.io/t/micrortps-client-does-not-receive-uorb-message/17854) and [Unable to establish FastRTPS connection with pixhawk. #38](https://github.com/PX4/px4_ros_com/issues/38).

Plug Pixhawk 4 into companion computer via USB, make and upload the firmware from the PX4-Autopilot directory:

```auto
make px4_fmu-v5_rtps
make px4_fmu-v5_rtps upload

```

Enter the `nsh>` from `~/PX4-Autopilot/Tools$`:

```auto
python3 mavlink_shell.py 

```

Start the micrortps\_client over UART instead of UDP (which works for SITL):

```auto
nsh> micrortps_client start -t UART

```

In a new terminal, source ROS2 and start the micrortps\_agent over UART:

```auto
micrortps_agent start -t UART

```

In a new terminal, source ROS2 and echo the desired topic (or run the desired listener):

```auto
ros2 topic echo /fmu/vehicle_odometry/out

```

And the vehicle\_odometry topic is printed for the Pixhawk 4 as desired. Hope this helps someone else stuck in the future!

---

_[View the full topic](https://discuss.px4.io/t/building-px4-ros2-bridge-on-hardware-pixhawk-4/24266)._
