msg: add message translation node for ROS

This commit is contained in:
Beat Küng
2024-10-29 14:50:08 +01:00
committed by Silvan Fuhrer
parent 975ec30c9c
commit f6bfa9812e
32 changed files with 3200 additions and 0 deletions
@@ -8,6 +8,7 @@ if [ $# -gt 0 ]; then
fi
exec find boards msg src platforms test \
-path msg/translation_node -prune -o \
-path platforms/nuttx/NuttX -prune -o \
-path platforms/qurt/dspal -prune -o \
-path src/drivers/ins/vectornav/libvnc -prune -o \
+34
View File
@@ -0,0 +1,34 @@
#! /bin/bash
# Copy msgs and the message translation node into a ROS workspace directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
PX4_SRC_DIR="$DIR/.."
WS_DIR="$1"
if [ ! -e "${WS_DIR}" ]
then
echo "Usage: $0 <ros_ws_dir>"
exit 1
fi
WS_DIR="$WS_DIR"/src
if [ ! -e "${WS_DIR}" ]
then
echo "'src' directory not found inside ROS workspace (${WS_DIR})"
exit 1
fi
cp -ar "${PX4_SRC_DIR}"/msg/translation_node "${WS_DIR}"
cp -ar "${PX4_SRC_DIR}"/msg/px4_msgs_old "${WS_DIR}"
PX4_MSGS_DIR="${WS_DIR}"/px4_msgs
if [ ! -e "${PX4_MSGS_DIR}" ]
then
git clone https://github.com/PX4/px4_msgs.git "${PX4_MSGS_DIR}"
rm -rf "${PX4_MSGS_DIR}"/msg/*.msg
rm -rf "${PX4_MSGS_DIR}"/msg/versioned/*.msg
rm -rf "${PX4_MSGS_DIR}"/srv/*.srv
fi
cp -ar "${PX4_SRC_DIR}"/msg/*.msg "${PX4_MSGS_DIR}"/msg
mkdir -p "${PX4_MSGS_DIR}"/msg/versioned
cp -ar "${PX4_SRC_DIR}"/msg/versioned/*.msg "${PX4_MSGS_DIR}"/msg/versioned
cp -ar "${PX4_SRC_DIR}"/srv/*.srv "${PX4_MSGS_DIR}"/srv