Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ FROM pre-dev AS dep-ros2
ARG MICRO_XRCE_DDS_AGENT_VERSION=v2.4.2
ARG PX4_MSGS_VERSION=release/1.16
ARG PX4_ROS2_INTERFACE_LIB_VERSION=release/1.16
RUN --mount=type=bind,source=./docker/scripts/build_ros_deps.sh,target=/root/scripts/build_ros_deps.sh /root/scripts/build_ros_deps.sh ${MICRO_XRCE_DDS_AGENT_VERSION} ${PX4_MSGS_VERSION} ${PX4_ROS2_INTERFACE_LIB_VERSION}
ARG PX4_ROS_COM_VERSION=release/1.16
RUN --mount=type=bind,source=./docker/scripts/build_ros_deps.sh,target=/root/scripts/build_ros_deps.sh /root/scripts/build_ros_deps.sh ${MICRO_XRCE_DDS_AGENT_VERSION} ${PX4_MSGS_VERSION} ${PX4_ROS2_INTERFACE_LIB_VERSION} ${PX4_ROS_COM_VERSION}

########################################
## BUILD PX4 ##
Expand Down
2 changes: 2 additions & 0 deletions docker/scripts/build_ros_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ set -eo pipefail
MICRO_XRCE_DDS_AGENT_VERSION=$1
PX4_MSGS_VERSION=$2
PX4_ROS2_INTERFACE_LIB_VERSION=$3
PX4_ROS_COM_VERSION=$4

mkdir -p /root/px4_ros_ws/src && cd /root/px4_ros_ws/src && \
git clone --depth 1 -b ${MICRO_XRCE_DDS_AGENT_VERSION} https://github.com/eProsima/Micro-XRCE-DDS-Agent.git && \
git clone --depth 1 -b ${PX4_MSGS_VERSION} https://github.com/PX4/px4_msgs.git && \
git clone --depth 1 -b ${PX4_ROS2_INTERFACE_LIB_VERSION} https://github.com/Auterion/px4-ros2-interface-lib.git && \
git clone --depth 1 -b ${PX4_ROS_COM_VERSION} https://github.com/PX4/px4_ros_com.git && \
git clone --depth 1 -b humble https://github.com/ros-perception/vision_opencv.git && \
git clone --depth 1 -b humble https://github.com/ros-perception/image_common.git && \
git clone --depth 1 -b humble https://github.com/ros-perception/image_transport_plugins.git && \
Expand Down
23 changes: 23 additions & 0 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,29 @@ For example, you can check the PX4 vehicle status with
ros2 topic echo /fmu/out/vehicle_status_v1
```

You can also try the `sensor_combined_listener` node from the [px4_ros_com](https://github.com/PX4/px4_ros_com) package and get a user friendly visualization of PX4 accelerometer and gyroscope data:

```sh
ros2 run px4_ros_com sensor_combined_listener --ros-args -p use_sim_time:=true
```

It will output something like:

```sh
RECEIVED SENSOR COMBINED DATA
=============================
ts: 93380000
gyro_rad[0]: -0.000287732
gyro_rad[1]: -0.000181083
gyro_rad[2]: -0.00105683
gyro_integral_dt: 4000
accelerometer_timestamp_relative: 0
accelerometer_m_s2[0]: -0.00764366
accelerometer_m_s2[1]: 6.15756e-05
accelerometer_m_s2[2]: -9.79929
accelerometer_integral_dt: 4000
```

### Foxglove visualization

You can use the [px4_tf](../px4_roscon_25/px4_tf/README.md) packages, in conjunction with `foxglove_bridge` to visualize in 3D the drone `base_link`.
Expand Down