Added decawave
This commit is contained in:
parent
349f97c7db
commit
fc26ec03f1
1
99-decawave.rules
Normal file
1
99-decawave.rules
Normal file
@ -0,0 +1 @@
|
||||
SUBSYSTEM=="tty", ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0105", SYMLINK+="decawave"
|
@ -21,6 +21,7 @@ echo
|
||||
echo
|
||||
|
||||
set -x
|
||||
rosrun rosaria RosAria _port:=$ARIA_PORT _tf_prefix:=${ROS_NAMESPACE} &
|
||||
rosrun hokuyo_node hokuyo_node _frame_id:="PIONIER${PIONIER_ID}/laser" &
|
||||
rosrun tf static_transform_publisher 0.16 0 0 0 0 0 ${ROS_NAMESPACE}/base_link "${ROS_NAMESPACE}/laser" 100
|
||||
|
||||
rosrun rosaria RosAria _port:=$ARIA_PORT _tf_prefix:=PIONIER${PIONIER_ID} &
|
||||
rosrun hokuyo_node hokuyo_node _frame_id:="laser${PIONIER_ID}"
|
||||
|
@ -5,6 +5,15 @@ if [ "$EUID" -ne 0 ]
|
||||
exit
|
||||
fi
|
||||
|
||||
cd radio-lap
|
||||
docker build . -t decawave
|
||||
cd ..
|
||||
|
||||
cd Legacy
|
||||
docker build . -t irth7/rosaria-legacy
|
||||
cd ..
|
||||
|
||||
cp 99-decawave.rules /etc/udev/rules.d/
|
||||
cp rosaria-docker.service /etc/systemd/system/
|
||||
chmod g+w /etc/systemd/system/rosaria-docker.service
|
||||
systemctl daemon-reload
|
||||
|
15
radio-lap/Dockerfile
Normal file
15
radio-lap/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
||||
FROM ros:noetic-ros-core
|
||||
|
||||
RUN apt-get update -y && apt-get install ros-noetic-tf python3-serial python3-catkin-tools build-essential -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
SHELL ["/bin/bash", "--login", "-c"]
|
||||
WORKDIR /ws
|
||||
|
||||
COPY ./src /ws/src
|
||||
RUN source /opt/ros/noetic/setup.bash && catkin_make && \
|
||||
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc && \
|
||||
echo "source /ws/devel/setup.bash" >> ~/.bashrc
|
||||
ENV ROS_MASTER_URI=http://10.104.16.29:11311/
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
6
radio-lap/entrypoint.sh
Executable file
6
radio-lap/entrypoint.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source /opt/ros/noetic/setup.bash
|
||||
source /ws/devel/setup.bash
|
||||
set -x
|
||||
roslaunch ros_decawave decawave_driver.launch pionier_id:=${PIONIER_ID}
|
69
radio-lap/src/CMakeLists.txt
Normal file
69
radio-lap/src/CMakeLists.txt
Normal file
@ -0,0 +1,69 @@
|
||||
# toplevel CMakeLists.txt for a catkin workspace
|
||||
# catkin/cmake/toplevel.cmake
|
||||
|
||||
cmake_minimum_required(VERSION 3.0.2)
|
||||
|
||||
project(Project)
|
||||
|
||||
set(CATKIN_TOPLEVEL TRUE)
|
||||
|
||||
# search for catkin within the workspace
|
||||
set(_cmd "catkin_find_pkg" "catkin" "${CMAKE_SOURCE_DIR}")
|
||||
execute_process(COMMAND ${_cmd}
|
||||
RESULT_VARIABLE _res
|
||||
OUTPUT_VARIABLE _out
|
||||
ERROR_VARIABLE _err
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT _res EQUAL 0 AND NOT _res EQUAL 2)
|
||||
# searching fot catkin resulted in an error
|
||||
string(REPLACE ";" " " _cmd_str "${_cmd}")
|
||||
message(FATAL_ERROR "Search for 'catkin' in workspace failed (${_cmd_str}): ${_err}")
|
||||
endif()
|
||||
|
||||
# include catkin from workspace or via find_package()
|
||||
if(_res EQUAL 0)
|
||||
set(catkin_EXTRAS_DIR "${CMAKE_SOURCE_DIR}/${_out}/cmake")
|
||||
# include all.cmake without add_subdirectory to let it operate in same scope
|
||||
include(${catkin_EXTRAS_DIR}/all.cmake NO_POLICY_SCOPE)
|
||||
add_subdirectory("${_out}")
|
||||
|
||||
else()
|
||||
# use either CMAKE_PREFIX_PATH explicitly passed to CMake as a command line argument
|
||||
# or CMAKE_PREFIX_PATH from the environment
|
||||
if(NOT DEFINED CMAKE_PREFIX_PATH)
|
||||
if(NOT "$ENV{CMAKE_PREFIX_PATH}" STREQUAL "")
|
||||
if(NOT WIN32)
|
||||
string(REPLACE ":" ";" CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH})
|
||||
else()
|
||||
set(CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# list of catkin workspaces
|
||||
set(catkin_search_path "")
|
||||
foreach(path ${CMAKE_PREFIX_PATH})
|
||||
if(EXISTS "${path}/.catkin")
|
||||
list(FIND catkin_search_path ${path} _index)
|
||||
if(_index EQUAL -1)
|
||||
list(APPEND catkin_search_path ${path})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# search for catkin in all workspaces
|
||||
set(CATKIN_TOPLEVEL_FIND_PACKAGE TRUE)
|
||||
find_package(catkin QUIET
|
||||
NO_POLICY_SCOPE
|
||||
PATHS ${catkin_search_path}
|
||||
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
|
||||
unset(CATKIN_TOPLEVEL_FIND_PACKAGE)
|
||||
|
||||
if(NOT catkin_FOUND)
|
||||
message(FATAL_ERROR "find_package(catkin) failed. catkin was neither found in the workspace nor in the CMAKE_PREFIX_PATH. One reason may be that no ROS setup.sh was sourced before.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
catkin_workspace()
|
1
radio-lap/src/ros_decawave
Submodule
1
radio-lap/src/ros_decawave
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit cee43c8ea4496df46ec00bc851082186b86ad169
|
7
run.sh
7
run.sh
@ -2,5 +2,10 @@
|
||||
# Script running rosaria inside docker container
|
||||
echo "ID: $PIONIER_ID"
|
||||
|
||||
docker run --privileged --network=host --device=/dev/ttyS0 -i -e ROS_IP=$(hostname -I | awk '{print $1}') -e PIONIER_ID=$(hostname | sed 's/[^0-9]//g'
|
||||
docker run -d --privileged --network=host --device=/dev/ttyS0 -i -e ROS_IP=$(hostname -I | awk '{print $1}') -e PIONIER_ID=$(hostname | sed 's/[^0-9]//g'
|
||||
) irth7/rosaria-legacy
|
||||
|
||||
if [ -e "/dev/decawave" ]; then
|
||||
echo "found tag"
|
||||
docker run --network=host --device=/dev/decawave -e PIONIER_ID=$(hostname | sed 's/[^0-9]//g') decawave
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user