ROS packages for autonomous trajectory planning and tracking for IG32 Mecanum Ground Rover.
Built and tested on Intel NUC with Ubuntu 20.04 and ROS Noetic.
- Install dependencies:
pip install numpy scipy
- Install pytorch: https://pytorch.org/get-started/locally/ (select Stable, Linux, Pip, Python, CPU)
- Setup ROS with Arduino (https://maker.pro/arduino/tutorial/how-to-use-arduino-with-robot-operating-system-ros)
- Flash Arduino code:
- Install catkin tools: https://catkin-tools.readthedocs.io/en/latest/installing.html
- Install ROS dependencies:
sudo apt-get update
androsdep install --from-paths .
git clone https://github.com/adamdai/rover_ros_ws.git
cd rover_ros_ws
catkin build
source devel/setup.bash
Nodes:
traj_tracker.py
: Listens for published nominal trajectories and handles state estimation and low-level control for tracking.
Nodes:
simple_planner.py
: Publishes a single nominal trajectory parameterized by desired linear and angular velocity (can be provided as command-line arguments, i.e.,rosrun planner simple_planner.py w_des v_des
).sequence_planner.py
: Publishes a pre-defined sequence of nominal trajectoriesnn_planner.py
: Uses a pre-trained neural network to generate trajectories which avoid obstacles and reach a specified goal region.reachability_planner.py
: Uses the neural network planner with an added reachability safety layer which checks the safety of planned trajectories and replans if unsafe.
Nodes:
mocap.py
: Interface with vrpn mocap topic to provide mocap measurements.
params.py
: Edit global parameters.
Contains all third party ROS packages used: vrpn_client_ros
, cv_camera
, apriltag
,apriltag_ros
- Start vrpn client:
roslaunch vrpn_client_ros sample.launch
- Start rosserial:
rosrun rosserial_python serial_node.py _port:=/dev/ttyACM0
- Start sensing nodes:
rosrun sensing mocap.py
rosrun cv_camera cv_camera_node
roslaunch apriltag_ros continuous_detection.launch
- Start planning/control nodes:
rosrun controller traj_tracker.py
rosrun planner simple_planner.py
orrosrun planner nn_planner.py
orrosrun planner reachability_planner.py