Integrating Livox, RoboSense, and Hikvision Sensors with ROS Noetic on Ubuntu 20.04
ROS Noetic Environment Setup
Before interfacing with any sensors, establish a compatible ROS environment. Ubuntu 20.04 pairs with ROS Noetic. Configure the package repositories and installl the desktop-full variant:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt install curl
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
sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
Livox HAP LiDAR Driver Compilation
The Livox HAP requires the second-generation SDK. Clone the repository, configure the build environment, and compile the shared libraries:
mkdir -p ~/sensor_ws/livox_src && cd ~/sensor_ws/livox_src
git clone https://github.com/Livox-SDK/Livox-SDK2.git
cd Livox-SDK2
mkdir -p cmake_build && cd cmake_build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j$(nproc)
sudo make install
sudo ldconfig
Verify the installation by checking the library paths or running the provided sample executables within the SDK directory.
RoboSense LiDAR ROS Integration
RoboSense devices utilize the rslidar_sdk package. Initialize a catkin workspace, fetch the source code along with its dependencies, and compile:
mkdir -p ~/robosense_ws/src && cd ~/robosense_ws/src
git clone https://github.com/RoboSense-LiDAR/rslidar_sdk.git
cd rslidar_sdk
git submodule update --init --recursive
cd ~/robosense_ws
catkin_make -DCMAKE_BUILD_TYPE=Release
source devel/setup.bash
Launch the driver node to begin publishing point cloud data:
roslaunch rslidar_sdk start.launch
Adjust the start.launch parameters to match your specific RoboSense model and network configuration.
Hikvision Industrial Camera Configuration
Machine Vision Studio (MVS) Client
Download the Linux-compatible MVS client from the official Hikrobot portal. For Debian-based systems, install the package directly:
sudo dpkg -i MVS-3.0.1_x86_64_20240629.deb
sudo apt-get install -f
Launch the GUI to verify camera connectivity and adjust exposure or trigger settings:
/opt/MVS/bin/MVS.sh
ROS Driver Node
Create a dedicated workspace for the camera interface and clone the community-maintained ROS wrapper:
mkdir -p ~/hik_cam_ws/src && cd ~/hik_cam_ws/src
git clone https://github.com/luckyluckydadada/HIKROBOT-MVS-CAMERA-ROS.git hikrobot_ros_driver
cd ~/hik_cam_ws
catkin_make
If the compiler reports missing headers during the build, locate the required files from compatible Hikvision SDK examples or third-party repositories and place them in the driver's include directory. After successful compilation, source the workspace and launch the node:
source devel/setup.bash
roslaunch hikrobot_ros_driver camera_visualization.launch
Sensor Data Acquisition and Playback
With all drivers operational, synchronize data collection using ROS bag utilities. Start the master node and launch each sensor driver in separate terminals. Confirm data streams are active in RViz before recording.
Navigate to your target storage directory and capture all active topics:
mkdir -p ~/dataset/session_01 && cd ~/dataset/session_01
rosbag record -O sensor_capture.bag -a
To review the collected data, stop the live drivers and play back the archive:
rosbag play sensor_capture.bag --clock
Apppend the --loop flag for continuous playback. Open a separate terminal to visualize the replayed topics:
rviz -d ~/hik_cam_ws/src/hikrobot_ros_driver/config/default.rviz
Ensure topic names in RViz match those published during playback to correctly render point clouds and image feeds.