LiDAR integration for ROS This package has been tested on Ubuntu 16.04 and 18.04 with, respectively, ROS Kinetic and ROS Melodic.
- Install the following elements:
-
python-pip:
sudo apt-get install python-pip -
run pip command:
pip install --upgrade setuptools -
pip install conan -
cmake version >= 5 (latest release preferred).
download and extract the cmake files, open terminal
./bootstrap make sudo make install -
gcc-8 and g++8
Needed only for ubuntu 16.04.
sudo apt-get update sudo apt-get install build-essential software-properties-common -y sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y sudo apt-get install gcc-8 g++-8 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-8 -
edit conan profile:
nano ~/.conan/profiles/defaultReplace its content by the following lines (or add the missing lines):
[settings] os=Linux os_build=Linux arch=x86_64 arch_build=x86_64 compiler=gcc compiler.version=8 compiler.libcxx=libc++11 build_type=Release [options] [build_requires] [env]
-
Create a ros/catkin workspace if you don't have one already:
Here,
ros_wsrefers to the ros/catkin workspace.mkdir -p ros_ws/src cd ros_ws source /opt/ros/melodic/setup.bash catkin_make source devel/setup.bash -
Clone the ros_phantom_intelligence repo:
cd src git clone git@github.com:PhantomIntelligence/ros_phantom_intelligence.git # OR git clone https://github.com/PhantomIntelligence/ros_phantom_intelligence.git -
Build it
cd .. catkin_make -
(Optional) Build and run the tests
catkin_make run_tests_phantom_intelligence -
(Required to run a gazebo-simulated Lidar)
cp -a src/ros_phantom_intelligence/src/lidar_description/. ~/.gazebo/models/
The .launch files are named after the different sensors.
device_locationis the location of the sensor on your machine. The format of the location depends of the sensor you use.
Forawlsensors, which uses CAN to communicate, the value represent the can channel number.
- Source the ws after making it.
source ~/ros_ws/devel/setup.bash - Launch the launch file.
roslaunch phantom_intelligence awl16_gazebo.launch
The simulated sensor now publishes sensor data under the ros topic named /awl16.
Note: Make sure you are in a terminal which has
source <your_ros_ws>/devel/setup.bashand also make sure that you have built theros_phantom_intelligencepackage.
- Find out which sensor model you are using.
AWL16will be used for this example. - To start the sensor node, run:
roslaunch phantom_intelligence awl16.launch device_location:=0
Simultaneous use of multiple sensors is not yet supported by this package.
Note: Make sure you are in a terminal which has
source <your_ros_ws>/devel/setup.bashand also make sure that you have built theros_phantom_intelligencepackage.
roslaunch phantom_intelligence run_tests.launch