Table of Contents
Project for an autonomous 4 wheel independent steering robot using GPS and IMU.
- Ubuntu 20.04
- ROS Noetic
- Install dependencies
# CAN sudo apt-get install ros-noetic-ros-canopen # NMEA GPS Package sudo apt-get install python3-testresources sudo apt-get install ros-noetic-catkin-virtualenv # TEB Local Planner sudo apt-get install ros-noetic-teb-local-planner # Robot Localization Package sudo apt-get install ros-noetic-robot-localization # GPS Plugin sudo apt-get install ros-noetic-hector-gazebo-plugins # Move Base Package sudo apt-get install ros-noetic-move-base # Map Server sudo apt-get install ros-noetic-map-server # Keyboard control sudo apt install ros-noetic-teleop-twist-keyboard # Joystick control sudo apt install ros-noetic-joy
- Clone the repo
git clone https://github.com/pvela2017/LNS-Robot
- Compile
cd ./LNS-Robot && catkin_make
- Prepare the CAN bus and Joystick
# CAN0
sudo ip link set can0 up type can bitrate 1000000
# CAN1
sudo ip link set can1 up type can bitrate 1000000
# Joystick
sudo chmod a+rw /dev/input/js0
- Initialize IMU and GPS
roslaunch lns_launch nav_sensors.launch
- Launch the CAN buses
roslaunch lns_launch can_bus.launch
- Bringup driving motor interface
roslaunch lns_bringup bringup_driving.launch
- Bringup steering motor interface
roslaunch lns_bringup bringup_steering.launch
- Launch driving motors interface
roslaunch driving_pid driving_pid.launch
roslaunch driving_motors driving_motors.launch
- Launch steering motors interface
roslaunch steering_motors steering_feedback.launch
roslaunch steering_pid steeringposition_pid.launch
roslaunch steering_motors steering_motors.launch
- URDF, TF and joint transforms:
roslaunch lns_bringup lns_bringup.launch
- Controller interface:
# Swerve Controller
roslaunch lns_controller main_controller_swerve.launch
- Then the whole navigation system can be launch using:
roslaunch lns_launch lns_real.launch
This will launch:
- The navigation sensor (GPS & IMU) package
- The localization package
- The navigation package
Keyboard control:
# Keyboard
roslaunch lns_teleop teleop_keyboard_swerve.launch
# Joystick
roslaunch lns_teleop teleop_joystick_swerve.launch
The simulation can be launch using:
roslaunch lns_launch lns_sim.launch
This will launch:
- The gazebo environment
- The localization package
- The navigation package
- The move base package
- Start the gazebo simulation environment.
roslaunch lns_gazebo empty_world.launch
- Start the robot control package.
roslaunch lns_controller main_controller_sim.launch
- Start the robot_localization package.
roslaunch lns_navigation start_navigation_with_gps_ekf_sim.launch
- Start the move base package.
roslaunch lns_navigation move_sim.launch