The purpose of this project is to develop an autonomous navigation robot that utilizes a LiDAR (Light Detection and Ranging) sensor for environmental perception. The robot will be capable of exploring and navigating its surroundings while avoiding obstacles and reaching its designated target locations.
- Build a robot platform capable of autonomous movement
- Integrate a Livox HAP LiDAR sensor for accurate environmental perception
- Implement algorithms for obstacle detection, localization, mapping, and path planning
- Agile X Scout Mini
- Livox HAP LiDAR
- Intel NUC
Livox HAP LiDAR
Livox HAP Manual
Agile X Scout Mini
Intel NUC
https://github.com/hku-mars/loam_livox
https://github.com/Livox-SDK/livox_ros_driver2
https://github.com/Livox-SDK/Livox-SDK2
https://github.com/agilexrobotics/scout_ros
https://github.com/agilexrobotics/ugv_sdk
https://github.com/Livox-SDK/LIO-Livox
[1] Install ROS Noetic
[1.5]Testing ROS Install
[2] Install CMake
[3] Install PCL
[4] Setting up Catkin
[5] Livox HAP Communication Protocol
[6] Agile X Scout Mini Manual
sudo gedit /etc/default/grub
sudo update-grub2
sudo apt install nvidia-driver-515 nvidia-dkms-515
sudo apt-get update
sudo apt-get install build-essential git cmake libasio-dev
sudo apt install curl
sudo apt update
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo apt update
sudo apt install ros-noetic-desktop-full
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc #Automatically set up your ROS environment every time you open a new terminal
sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
sudo apt install python3-rosdep
sudo rosdep init
rosdep update
Be sure to clone the source code in a '[work_space]/src/' folder (as shown above), otherwise compilation errors will occur due to the compilation tool restriction.
cd
mkdir scout_ws
cd scout_ws
mkdir src
cd ~/scout_ws/src
git clone https://github.com/westonrobot/scout_mini_ros.git
git clone https://github.com/westonrobot/ugv_sdk.git
cd ~/scout_ws
catkin_make #Build workspace
sudo apt-get install ros-noetic-teleop-twist-keyboard ros-noetic-gmapping ros-noetic-navigation ros-noetic-robot-localization ros-noetic-robot-state-publisher ros-noetic-tf2-ros ros-noetic-joint-state-publisher-gui
echo "source ~/scout_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
cd ~/scout_ws/src
git clone https://github.com/Livox-SDK/livox_ros_driver2.git scout_ws/src/livox_ros_driver2
source /opt/ros/noetic/setup.sh
./build.sh ROS1
cd ~/scout_ws/src
git clone https://github.com/Livox-SDK/Livox-SDK2.git
cd ./Livox-SDK2/
mkdir build
cd build
cmake .. && make -j
sudo make install
cd ~/scout_ws/src
git clone https://github.com/hku-mars/loam_livox.git
cd ..
catkin_make
source ~/scout_ws/devel/setup.bash
cd ~/scout_ws/src
git clone https://github.com/Livox-SDK/LIO-Livox
cd ..
catkin_make
source ~/scout_ws/devel/setup.bash
https://www.livoxtech.com/downloads
Note: Livox Viewer 2 should be used for sensor calibration, not recording or playback.
in ~/scout_ws/
Copy and paste "create_timestamp.py" from create_timestamp.py
Replace camel-aax as needed with your username in [scout_mini_SLAM.launch]()
in ~/scout_ws/src/scout_ros/scout_bringup/launch/
Copy and paste "scout_mini_SLAM.launch" from scout_mini_SLAM.launch
in ~/scout_ws/src/livox_ros_driver2/config/
Replace "HAP_config.json" with HAP_config.json
in ~/scout_ws/src/livox_ros_driver2/launch_ROS1/
Replace Broadcast Code on line 4 -> "<arg name="bd_list" default="5CWD227EA1001F1"/>" as needed with your Broadcast Code"
Replace "rviz_HAP.launch" with rviz_HAP.launch
in ~/scout_ws/src/loam_livox/source/
Replace "livox_feature_extractor.hpp" with livox_feature_extractor.hpp
Replace "laser_mapping.hpp" with laser_mapping.hpp
in ~/scout_ws/src/loam_livox/lauch/
Replace "livox.launch" with livox.launch
cd
cd Desktop
mkdir RosBags
sudo ifconfig enp89s0 192.168.1.50 #Sets IP Address of LiDAR to Ethernet
cd ~/scout_ws/
catkin_make
source devel/setup.bash
- Ensure you've ran
sudo ifconfig enp89s0 192.168.1.50
- Ensure Scout Mini is turned on
- Disconnect and reconnect Ethernet cable
- Reinstall network drivers
sudo apt-get install --reinstall network-manager
In terminal 1
sudo modprobe gs_usb #Enable gs_usb kernel module
rosrun scout_bringup bringup_can2usb.bash
candump can0 #Receive feedback from scout
In terminal 2
roslaunch scout_bringup scout_mini_robot_base.launch #Start base node for scout
In terminal 3
cansend can0 XXX#XXXXXXXXXXXXXXXX #Send CAN command
sudo ip link set can0 down #Terminate CAN communication
Note: Follow the CAN protocol specified in the Scout Mini Manual. There is a typo in the manual for the Lighting Control Frame. For byte[1], 0x00 turns the light off, 0x01 turns the light on.
cansend can0 121#0101000000000000 #Turn front light on
cansend can0 111#0253000000000000 #Move forward at speed 0x0253, or 595
In terminal 1
in ~/scout_ws/
roscore
In terminal 2
in ~/scout_ws/
roslaunch scout_bringup scout_mini_SLAM.launch timestamp:=$(python3 generate_timestamp.py)
In terminal 3
killall roscore #Stops ROS
In terminal 4
cansend
In terminal 1
in ~/scout_ws/
roscore
In terminal 2
in ~/scout_ws/
rosrun rviz rviz
select config with file --> open
config/recent/display_point_cloud
In terminal 3
rosbag play "/path to file/rosbag.bag"
- Experiment with Livox Viewer 2 for sensor calibration. We want to ensure that the sensor is calibrated before recording and processing data.
- Implement SLAM (Simultaneous Localization and Mapping) using LOAM Livox or LIO Livox. LIO Livox is inherently supports the HAP Sensor.
- Implement real-time navigation using a combination of SLAM and CAN commands.