mirror of
git://soft.sys114.com/odroid-stamper
synced 2025-12-19 00:18:42 +09:00
ODROID-M1: custom: Add ros2 weston image
Signed-off-by: steve.jeong <jkhpro1003@gmail.com> Change-Id: Idd291df2996bfba933d6f0900a605b941cc54440
This commit is contained in:
7
custom/ros2/config
Normal file
7
custom/ros2/config
Normal file
@@ -0,0 +1,7 @@
|
||||
BOARD=odroidm1
|
||||
ARCH=arm64
|
||||
DISTRO=focal
|
||||
FLAVOUR=weston
|
||||
DEFAULT_USER=odroid
|
||||
DEFAULT_PASSWD=odroid
|
||||
ALLOW_ROOT_LOGIN=false
|
||||
5
custom/ros2/fixups/S11-ros2-locale
Normal file
5
custom/ros2/fixups/S11-ros2-locale
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
locale-gen en_US en_US.UTF-8
|
||||
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
|
||||
export LANG=en_US.UTF-8
|
||||
16
custom/ros2/fixups/S15-add-repository
Normal file
16
custom/ros2/fixups/S15-add-repository
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
repo=ppa:deadsnakes/ppa
|
||||
|
||||
if [ -z $(which add-apt-repository) ]; then
|
||||
apt update -y
|
||||
apt install @@DEFAULT_APT_OPTIONS@@ \
|
||||
software-properties-common
|
||||
fi
|
||||
|
||||
add-apt-repository ${repo} -y
|
||||
apt install -y curl gnupg2 lsb-release
|
||||
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
|
||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu @@DEFAULT_DISTRO@@ main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null
|
||||
cat /etc/apt/sources.list.d/ros2.list
|
||||
apt update -y && apt upgrade -y
|
||||
5
custom/ros2/fixups/S85-config
Normal file
5
custom/ros2/fixups/S85-config
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -f /boot/config.ini ]; then
|
||||
sed -i '/generic/,/overlays/ s/^overlays=.*$/overlays=\"rknpu ov5647\"/' /boot/config.ini
|
||||
fi
|
||||
14
custom/ros2/fixups/S90-librknn
Normal file
14
custom/ros2/fixups/S90-librknn
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
HOME=/home/odroid
|
||||
RKNN=/home/odroid/rknpu2/runtime/Linux/librknn_api/aarch64/librknnrt.so
|
||||
|
||||
echo "========== git clone start =========="
|
||||
git clone https://github.com/hardkernel/rknpu2 ${HOME}/rknpu2
|
||||
echo "========== git clone finish =========="
|
||||
|
||||
echo "========== examples seting start =========="
|
||||
chown -R odroid:odroid ${HOME}/rknpu2/
|
||||
[ -f ${RKNN} ] && cp ${RKNN} /usr/lib/librknnrt.so
|
||||
rm -rf ${HOME}/rknpu2
|
||||
echo "========== examples seting finish =========="
|
||||
58
custom/ros2/fixups/S91-ros-config
Normal file
58
custom/ros2/fixups/S91-ros-config
Normal file
@@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
|
||||
HOME=/home/odroid
|
||||
|
||||
echo "===== git clone npu_camera ros pkg ====="
|
||||
git clone https://github.com/hardkernel/npu_camera ${HOME}/robot_ws
|
||||
chown -R odroid:odroid ${HOME}/robot_ws
|
||||
|
||||
cat<<__EOF >> ${HOME}/.bashrc
|
||||
|
||||
# ROS setting
|
||||
source /opt/ros/foxy/setup.bash
|
||||
source ~/robot_ws/install/local_setup.bash
|
||||
|
||||
source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash
|
||||
source /usr/share/colcon_cd/function/colcon_cd.sh
|
||||
export _colcon_cd_root=~/robot_ws
|
||||
|
||||
export ROS_DOMAIN_ID=7
|
||||
export ROS_NAMESPACE=robot1
|
||||
|
||||
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
|
||||
# export RMW_IMPLEMENTATION=rmw_connext_cpp
|
||||
# export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
|
||||
# export RMW_IMPLEMENTATION=rmw_gurumdds_cpp
|
||||
|
||||
# export RCUTILS_CONSOLE_OUTPUT_FORMAT='[{severity} {time}] [{name}]: {message} ({function_name}() at {file_name}:{line_number})'
|
||||
export RCUTILS_CONSOLE_OUTPUT_FORMAT='[{severity}]: {message}'
|
||||
export RCUTILS_COLORIZED_OUTPUT=1
|
||||
export RCUTILS_LOGGING_USE_STDOUT=0
|
||||
export RCUTILS_LOGGING_BUFFERED_STREAM=1
|
||||
|
||||
alias cw='cd ~/robot_ws'
|
||||
alias cs='cd ~/robot_ws/src'
|
||||
alias ccd='colcon_cd'
|
||||
|
||||
alias cb='cd ~/robot_ws && colcon build --symlink-install'
|
||||
alias cbs='colcon build --symlink-install'
|
||||
alias cbp='colcon build --symlink-install --packages-select'
|
||||
alias cbu='colcon build --symlink-install --packages-up-to'
|
||||
alias ct='colcon test'
|
||||
alias ctp='colcon test --packages-select'
|
||||
alias ctr='colcon test-result'
|
||||
|
||||
alias rt='ros2 topic list'
|
||||
alias re='ros2 topic echo'
|
||||
alias rn='ros2 node list'
|
||||
|
||||
alias killgazebo='killall -9 gazebo & killall -9 gzserver & killall -9 gzclient'
|
||||
|
||||
alias af='ament_flake8'
|
||||
alias ac='ament_cpplint'
|
||||
|
||||
alias testpub='ros2 run demo_nodes_cpp talker'
|
||||
alias testsub='ros2 run demo_nodes_cpp listener'
|
||||
alias testpubimg='ros2 run image_tools cam2image'
|
||||
alias testsubimg='ros2 run image_tools showimage'
|
||||
__EOF
|
||||
7
custom/ros2/overlay/etc/modules
Normal file
7
custom/ros2/overlay/etc/modules
Normal file
@@ -0,0 +1,7 @@
|
||||
# /etc/modules: kernel modules to load at boot time.
|
||||
#
|
||||
# This file contains the names of kernel modules that should be loaded
|
||||
# at boot time, one per line. Lines beginning with "#" are ignored.
|
||||
|
||||
rknpu
|
||||
video_rkisp
|
||||
2
custom/ros2/overlay/etc/udev/rules.d/99-odroid-rga.rules
Normal file
2
custom/ros2/overlay/etc/udev/rules.d/99-odroid-rga.rules
Normal file
@@ -0,0 +1,2 @@
|
||||
# /dev/rga
|
||||
SUBSYSTEM=="misc", ENV{DEVNAME}=="/dev/rga", GROUP="odroid", MODE="0660"
|
||||
@@ -0,0 +1,2 @@
|
||||
# /dev/video*
|
||||
SUBSYSTEM=="video4linux", ENV{DEVNAME}=="/dev/video*", MODE="0660"
|
||||
12
custom/ros2/packages
Normal file
12
custom/ros2/packages
Normal file
@@ -0,0 +1,12 @@
|
||||
cmake
|
||||
g++
|
||||
git
|
||||
gstreamer1.0-plugins-good
|
||||
libopencv-dev
|
||||
librga-dev
|
||||
make
|
||||
python3-colcon-common-extensions
|
||||
python3-pip
|
||||
rkaiq
|
||||
ros-foxy-ros-base
|
||||
virtualenv
|
||||
Reference in New Issue
Block a user