This is the development repository for an autonomous omnidirectional robot.
Note: fastlio_ws is no longer used.
This project contains three main workspaces:
sentry-navigation
├── livox_ws
├── slam_ws
└── navigation_wsThe livox_ws contains the livox_ros_driver2 package and the slam_ws contains the FAST-LIO-SAM-QN and FAST-LIO-Localization-QN packages. The navigation_ws is the main workspace for navigation.
Create a conda environment with python>=3.10 and install the following packages using python3 -m pip install.
empy==3.3.4
catkin_package
pyyaml
rospkg
pyserial
crc
numpy
opencv-python
pynputMake sure you have ROS Noetic installed. Install the following with sudo apt-get.
ros-noetic-map-server
ros-noetic-robot-localization
ros-noetic-move-base
ros-noetic-teb-local-plannerSee here for instructions.
Install the dependencies shown in here and here.
Clone the repository:
git clone --recursive https://github.com/jerrywrx/sentry-navigation.gitFollow the EXACT order below for correct workspace overlaying:
source /opt/ros/noetic/setup.bashcd ~/sentry-navigation/livox_ws/src/livox_ros_driver2
./build.sh ROS1
source ../../devel/setup.bashcd ~/sentry-navigation/slam_ws
catkin_make --only-pkg-with-deps nano_gicp
catkin_make --only-pkg-with-deps fast_lio_sam_qn
catkin_make --only-pkg-with-deps fast_lio_localization_qn
catkin_make --only-pkg-with-deps fast_lio
source devel/setup.bashcd ~/sentry-navigation/navigation_ws
catkin_make
source devel/setup.bashSee the connection section of this document.
In the config file below, change cmd_data_ip, push_msg_ip, point_data_ip, and imu_data_ip under MID360/host_net_info to the ip of the host. Change ip under lidar_configs to the ip of the lidar. For MID360, its of the form 192.168.1.1XX, where XX are the last two digits of the lidar's serial number.
livox_ws/src/livox_ros_driver2/config/MID360_config.jsonsource /opt/ros/noetic/setup.bash
source ~/sentry-navigation/navigation_ws/devel/setup.bashLaunch livox driver
roslaunch livox_ros_driver2 msg_MID360.launchLaunch FAST-LIO SAM module (set rviz to false if using ssh)
roslaunch fast_lio_sam_qn run.launch lidar:=livox rviz:=falseAfter you finished building the map, press CTRL-C once to save the map. Move the saved map to slam_ws/src/results, otherwise it will be overwritten.
The map_server requires a 2D occupancy grid map in PNG format. You can convert a 3D PCD file into a 2D PNG file using pcd2png.py.
After converting, put the 2D map in navigation_ws/src/base_controller/params. Then, change image in map_server.yaml to the name of the 2D map.
Launch livox driver
roslaunch livox_ros_driver2 msg_MID360.launchLaunch FAST-LIO Localization module (set rviz to false if using ssh). Before launching, set saved_map in
slam_ws/src/mid360_localization/FAST-LIO-Localization-QN/fast_lio_localization_qn/config/config.yaml
to the directory of the map you built using FAST-LIO SAM.
roslaunch fast_lio_localization_qn run.launch lidar:=livox rviz:=falseLaunch the rest of the packages (pcl_processing, localization, laser_projection, base_controller, and move_base)
roslaunch start_all start_all.launch