Here is the demo video we apply this Project to the NUS ARC Whill
This project is based on the NUS ME5400A Robotics Project 1, it aims to develope and Autonomous Driving Platform with Tracking Function.
Install Pysot,
cd
git clone https://github.com/STVIR/pysot.git
Setup Pysot environment,
pip install numpy==1.21.0
pip install pytorch==2.2.1
pip install opencv-python
pip install pyyaml yacs tqdm colorama matplotlib cython tensorboardX
Build Pysot extensions,
cd ~/pysot
python setup.py build_ext --inplace
Run this command every time before you run the tracking node, or add it in to ~/.bashrc
export PYTHONPATH=~/pysot:$PYTHONPATH
Download the Pysot model from Here And put it into ~/ME5400_Final/src/tracking/scripts/pysot/siamrpn_r50_l234_dwxcorr_lt
Install all non-ROS prerequisite packages,
sudo apt-get install ros-noetic-joy ros-noetic-teleop-twist-joy ros-noetic-teleop-twist-keyboard ros-noetic-laser-proc ros-noetic-rgbd-launch ros-noetic-depthimage-to-laserscan ros-noetic-rosserial-arduino ros-noetic-rosserial-python ros-noetic-rosserial-server ros-noetic-rosserial-client ros-noetic-rosserial-msgs ros-noetic-amcl ros-noetic-map-server ros-noetic-move-base ros-noetic-urdf ros-noetic-xacro ros-noetic-compressed-image-transport ros-noetic-rqt-image-view ros-noetic-gmapping ros-noetic-navigation ros-noetic-interactive-markers rviz
sudo apt update && sudo apt install \
git wget qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools \
python3-rosdep \
python3-vcstool \
python3-colcon-common-extensions \
# maven default-jdk # Uncomment to install dependencies for message generation
Message generation via FleetMessages.idl
is done using dds_idlc
from CycloneDDS
. For convenience, the generated mesasges and files has been done offline and committed into the code base. They can be found here.
./dds_idlc -allstructs FleetMessages.idl
cd
cd ME5400_Final
catkin_make
Move ff_ros1_ws folder out
cd ~/ME5400_Final
mv ff_ros1_ws ..
Install all the dependencies through rosdep
,
cd ~/ff_ros1_ws
rosdep install --from-paths src --ignore-src --rosdistro noetic -yr
Source ROS 1 and build (Run colcon build twice if you had error output for the first time),
cd ~/ff_ros1_ws
source /opt/ros/noetic/setup.bash
colcon build
colcon build
Please remember to source first!!!
source ~/ME5400_Final/devel/setup.bash
source ~/ff_ros1_ws/install/setup.bash
export PYTHONPATH=~/pysot:$PYTHONPATH
The default turtlebot3 model is set as waffle
export TURTLEBOT3_MODEL=waffle
Launch the Gazebo World:
# Navigate with pre-build map
roslaunch ff_examples_ros1 multi_turtlebot3_ff.launch
# Navigate without pre-build map
roslaunch ff_examples_ros1 multi_nomap.launch
Run the Tracking Node:
rosrun tracking tracking.py
Run the Following scripts:
source ~/ME5400_Final/devel/setup.bash
cd ~/ME5400_Final/following
# Following use pure cmd_vel control
python3 Cmdvel_following.py
# Following using move_base
python3 movebase_following.py
Setup the ROS_WHILL drive accroding to ros_whill_arc. Setup RealSense D435i drive. Help.
Launch ROS WHILL
roslaunch ros_whill ros_whill.launch
Launch RealSense
roslaunch realsense2_camera rs_camera.launch
Run the Tracking Node with RealSense
rosrun tracking tracking_realsense.py
Run the Following scripts:
cd ~/ME5400_Final/following
# Following use pure cmd_vel control
python3 Cmdvel_following.py
# Following using move_base
python3 movebase_following.py