mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-12 14:47:34 +08:00
msg: add message translation node for ROS
This commit is contained in:
@@ -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 \
|
||||
|
||||
Executable
+34
@@ -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
|
||||
Reference in New Issue
Block a user