This project includes simulation of binocular laser profile scanner with rotational table.
- ROS Noetic
- ROS Control and ROS Controllers
- Gazebo
- Rviz
- OpenCV
- PCL Viewer
-
Follow the ROS Noetic Installation steps in the link according to Desktop-Full Install. After that, ROS, Gazebo, RViz and OpenCV installations will be completed.
-
Install the ROS Control and ROS Controllers packages by executing:
sudo apt-get install ros-noetic-ros-control ros-noetic-ros-controllers
- Install PCL Viewer by executing:
sudo apt install libpcl-dev pcl-tools
- Source following bash script for using ROS terminal commands. If you do not want to type this command every time you open a terminal, you can add it to
~/.bashrc
.
source /opt/ros/noetic/setup.bash
- Creating catkin workspace:
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
catkin_make
- Clone repository and build package:
cd ~/catkin_ws/src/
git clone https://github.com/aliyildiz1/binocular_laser_profile_scanner.git
cd ..
catkin_make
- In order to load texture to projector, you need to copy texture image to
/usr/share/gazebo-11/media/materials/textures/
. Copy texture image by executing:
sudo cp ~/catkin_ws/src/binocular_laser_profile_scanner/projector_textures/line_laser_5p.png /usr/share/gazebo-11/media/materials/textures
- Launch simulation:
source ~/catkin_ws/devel/setup.bash
roslaunch binocular_laser_profile_scanner scanner_simulation.launch
- Open another terminal and start scanning:
cd ~/catkin_ws
source devel/setup.bash
rosrun binocular_laser_profile_scanner main.py
- After the scanning is completed, the point cloud is saved in the
~/catkin_ws/src/binocular_laser_profile_scanner/scans
folder. To visualize point cloud, execute following commands:
cd ~/catkin_ws/src/binocular_laser_profile_scanner/scans/
pcl_viewer scanned_point_cloud.pcd