This packages provides a detection system for pallets using Gazebo. An europallet model has been modified and now it has three marks for detection. OpenCV detects the color of the marks and filters the image. After that, it runs a algortihm to detect the shapes of the marks. With this localization and the pointcloud of the camera we get the distance. Finally, the position and orientations is calculated.
-
Make sure that you have running a simulation with a camera in gazebo
-
Check the camera topics. Get the name topics for image_raw and points
-
Set the camera topics in the launch file
gazebo_pallet_tracking/launch/pallet_tracking.launch
In this example:
<?xml version="1.0"?>
<launch>
<arg name="robot_id" default="robot" />
<arg name="camera_topic" default="rear_camera/rgb/image_raw" />
<arg name="camera_depth_topic" default="rear_camera/depth/points" />
<node...
- Spawn the europallet model in the simulation. This model has a three markers for detection. Add the model
into your
./gazebo
models folder:
$ roscd gazebo_pallet_tracking
$ cp ./europallet ~/.gazebo/models
- Run pallet detection:
$ roslaunch gazebo_pallet_tracking pallet_tracking.launch
- A window will be opened. You will see if a pallet is detected or not
- You can get the pose stamped of the pallet in the follow topic. It publish each time that a pallet is detected
$ rostopic echo /robot/pallet_detection/pose
- You can run the detection by a service:
$ rosservice call /robot/pallet_detection/trigger
If a pallet is detected it publish once in the follow topic:
$ rostopic echo /robot/pallet_detection/pose_triggered
-
You have to work with the europallet of this package. This pallet has been modified and it has three marks for detection
-
Only one pallet can be detected. If there are two pallets in the same detection range the behavior will be unexpected.