This document is for recording the actions done to integrate all the required systems (Husky, Outster LiDAR, FAST-LIO 2.0, AEDE, and TARE Planner) together on ROS Noetic.
📘 All packages should be added to the
catkin_ws/src
directory
Source code: https://github.com/husky/husky/tree/noetic-devel
- husky_bringup: installation and integration package
- husky_base: driver
- husky_gazebo: simulator bringup using Gazebo GUI
- husky-viz: vizualization configuration
- husky_control: controller configuration
- husky_description: URDF (Unified Robotics Description Format) description
- husky_msgs: messages (
HuskyStatus
exposes the status info) - husky_navigation: autonomous mapping & navigation demos
Bolded packages are the important ones used for operating the robot (TBV)
git submodule add https://github.com/ouster-lidar/ouster-ros.git
source /opt/ros/noetic/setup.bash
cd ../.. # back to /catkin_ws
catkin_make --cmake-args -DCMAKE_BUILD_TYPE=Release
- First run
source devel/setup.bash
(ensure that the it's the devel in the catkin_ws directory) - LiDAR must be connected then run:
roslaunch ouster_ros sensor.launch \ sensor_hostname:=os1-122011000244.local metadata:=<json file name> #<path to rosbag file> optional
- If bag file is being used instead
roslaunch ouster_ros replay.launch bag_file:=<path to rosbag file> metadata:=<json file name> # optional if bag file already contains metadata topic
- to see the topics being published, open another terminal, source the same bash file then run
rostopic list
sudo apt install libpcl-dev
(this is for Point Cloud Library)sudo apt install libeigen3-dev
sudo apt install libeigen3-dev
- Alternatively, download tar.gz file from Eigen source
- Untar using
tar -xzf <tarfile name>
- See instructions in
INSTALL.txt
in the untarred folder
- Intall livox_ros driver (TO-DO: See if this part can be removed from the source code)
- First install Livox SDK and follow installation instructions in
README.md
- This does not have to be in the main repo but needs to be done on the OS used
- Next, add livox driver to our
catkin_ws/src
directory usinggit submodule add https://github.com/Livox-SDK/livox_ros_driver.git ws_livox/src
- Run the following
cd ws_livox catkin_make
- First install Livox SDK and follow installation instructions in
- Go back to
catkin_ws/src
- Add Fast-LIO package using
git submodule add git clone https://github.com/hku-mars/FAST_LIO.git
- do the following:
cd FAST_LIO git submodule update --init
- If running FAST-LIO separately only with LiDAR, continue with the following:
cd ../.. source ../ws_livox/devel/setup.sh catkin_make
- Else, running
source devel/setup.bash
in our catkin workspace, followed bycatkin_make
will automatically build the required files accordingly too so the previous step will be unnecessary.
- Add Fast-LIO package using
source devel/setup.bash
roslaunch fast_lio mapping_ouster64.launch
Clone source code:
git clone https://github.com/HongbiaoZ/autonomous_exploration_development_environment.git
git checkout distribution
Change topic names in loam_interface.launch to match the topic names published by the LiDAR's Odometry data and Fast-LIO's PointCloud data:
- set
stateEstimationTopic
to/Odometry
- set
registeredScanTopic
to/cloud_registered
When running on the Husky
source devel/setup.sh
roslaunch vehicle_simulator system_real_robot.launch
Clone source code:
git clone https://github.com/caochao39/tare_planner.git
Change topic names in loam_interface.launch to match the topic names published by the LiDAR's Odometry data and Fast-LIO's PointCloud data:
- set
stateEstimationTopic
to/Odometry
- set
registeredScanTopic
to/cloud_registered
When running on the Husky
source devel/setup.sh
roslaunch tare_planner explore_husky.launch
- Run
catkin_create_pkg startup roscpp
to make a new startup package - In the
/launch
folder, addautonomous_husky_startup.launch
- This launch file will call all the other launch files required, namely:
husky_base
(which also calls husky_control and husky_teleop internally), ouster-ros'ssensor.launch
, fast-lio'smapping_ouster64.launch
, AEDE'ssystem_real_robot.launch
- This launch file will call all the other launch files required, namely:
- In the
/src
folder, addtwist_unstamp.cpp
- This is to extract the Twist data and publish it to the /cmd_vel topic to be used for controlling the husky
-
One time setup (refer to
bash_aliases.txt
)- Add aliases to ~/.bashrc in PC:
alias cd_pc='cd ~/Documents/autonomous_husky/catkin_ws' alias source_husky_pc='source ~/Documents/autonomous_husky/catkin_ws/devel/setup.bash'
- Add aliases to ~/.bashrc in NUC:
alias cd_nuc='cd ~/kaijuntay/autonomous_husky/catkin_ws' alias source_husky_nuc='source ~/kaijuntay/autonomous_husky/catkin_ws/devel/setup.bash'
source ~/.bashrc
in either console to use the alias commands for easier life when testing
-
On the NUC:
source setup_nuc.sh python3 preflight.py cd catkin_ws source devel/setup.bash #or source_husky_nuc
After running the above, preflight should show all tests passed and also display the IP address of the NUC to be used in the next step.
-
On the PC:
source setup_this.sh <NUC_IP> # this sets up the ROS_IP and ROS_MASTER_URI cd catkin_ws source devel/setup.bash
-
To run everything:
-
In the ssh terminal:
roslaunch startup autonomous_husky_startup.launch
All the nodes needed should be launched
- If TARE boundary is to be used, add argument
useBoundary:=true
- If a specific boundary is to be used for TARE, add argument
tareBoundary:=<BOUNDARY_FILE_NAME>
# Example roslaunch startup autonomous_husky_startup.launch useBoundary:=true tareBoundary:=<BOUNDARY_FILE_NAME>
Note that either the e_stop should be activated or the bumper of the controller should be held on to otherwise robot will start moving automatically.
- If TARE boundary is to be used, add argument
-
In the main PC:
roslaunch startup visualize.launch
-
Note: Since
/cmd_vel
has a lower priority than thejoy_teleop/cmd_vel
input from the controller, simply pressing the left bumper on the controller when AEDE is manoeuvring the robot will override the AEDE's control