ROS package that estimates the pose of an IFCO with respect to a camera.
- Installing the following packages via
aptshould be enough for buildingifco_pose_estimator:- ros-ROS_DISTRO-ros-core
- ros-ROS_DISTRO-pcl-ros
- ros-ROS_DISTRO-moveit
ifco_pose_estimatoralso uses theOpenCV,BoostandPCLlibraries, which will be installed by installing the packages above.- Clone this repository into a catkin workspace and run
catkin_make. - The package has been tested on Ubuntu 14.04 with ROS Indigo and Ubuntu 16.04 with ROS Kinetic.
The package performs the following steps:
- The
ifco_pose_serversubscribes to thepcl_topicand keeps only the points of the point cloud that might correspond to the IFCO based on thresholding of the A channel of an image of the scene in LAB format. - The
ifco_pose_serverfits an IFCO model to the resultant point cloud using ICP and theifco_poseservice returns the estimatedposeof the IFCO with respect to the camera and the achievedfitness. The IFCO coordinate frame is placed at the centre of the IFCO base with the z axis pointing away from the opening of the IFCO and the x axis pointing along the long side of the IFCO. - If the
ifco_poseservice was called with the parameterpublish_ifcoset toTrue, then theifco_pose_serverwill also publish the IFCO model in the planning scene.
The user must provide the node with the following information (usually via launch_ifco_pose_server.launch ):
- A
pcl_topicto subscribe to. - Parameters
A_highandA_lowwith which the aforementioned thresholding will be performed. - Maximum number of
icp_iterationsthat ICP will perform to converge. - An
initial_pose_estimateof the pose of the IFCO with respect to the camera. - Parameter
use_initial_pose_estimateto denote whether the user'sinitial_pose_estimatewill be used.
- All topics and tfs referenced above are expressed wrt the
cameraframe. This is thecamera_rgb_optical_framefor the Primesense or thekinect_ir_framefor the Kinect. - If
use_initial_pose_estimateis set to0, then the node will try to compute an estimate of the IFCO pose by averaging the position of the points of the point cloud that might correspond to the IFCO and rotating the model by -45 degrees along the x axis of the IFCO (this is based on the assumption that the camera will be usually overlooking the IFCO).
- Create a node that launches your camera and maps the proper frame to the
cameraframe. - Point the camera to an IFCO and do
roslaunch ifco_pose_estimator launch_ifco_pose_server.launch - Open Rviz.
- Do
rosrun ifco_pose_estimator ifco_pose_clientto test the node.