ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

roboearth: record a object: can't receive point clouds

asked 2012-03-01 22:46:53 -0500

Gemini Ma gravatar image

updated 2012-03-01 23:51:12 -0500

Hi,

Currently I'm working with the roboearth recording a 3D model object.

I use the kinect attached with turtlebot. Instead of following the record_and_upload_object tutorial, I find my own way starting the kinect through turtlebot:

roslaunch turtlebot_bringup minimal.launch
roslaunch turtlebot_bringup kinect.launch

Then i run the rviz, set Point Cloud2's topic to "/camera/rgb/points", and Color Transformer to "RGB8", I can see the colored scene. But the Color Transformer can't be set to "RGB8" if the topic is set to "/camera/depth/points", as said in the tutorial. Also there's no topic "/camera/depth_registered/points", even i can be sure the depth registration is enabled:

>rosparam get /openni_camera/depth_registration
true

In the roboearth stack, I modified several source code files as well:

  1. modified roboearth/object_scanning/re_object_recorder/src/mainwindow.cpp: original code:

ros::param::get("/camera/driver/depth_registration", depth_registration_enabled);

since the param "/camera/driver/depth_registration" doesn't exist in electric turtlebot, I changed it to :

ros::param::get("/openni_camera/depth_registration", depth_registration_enabled);
  1. modified roboearth/object_scanning/ar_bounding_box/include/ar_kinect/ar_kinect.h: original code:

const std::string cameraImageTopic_ = "/camera/depth_registered/image"; const std::string cameraInfoTopic_ = "/camera/depth_registered/camera_info"; const std::string cloudTopic_ = "/camera/depth_registered/points";

changed code:

const std::string cameraImageTopic_ = "/camera/depth/image";
const std::string cameraInfoTopic_  = "/camera/depth/camera_info";
const std::string cloudTopic_ = "/camera/depth/points";
  1. modified ccny_vision/ar_pose/include/ar_pose/ar_multi.h and ar_single.h

    original code:

const std::string cameraImageTopic_ = "/usb_cam/image_raw";

const std::string cameraInfoTopic_ = "/usb_cam/camera_info";

changed code:

const std::string cameraImageTopic_ = "/camera/rgb/image_raw";

const std::string cameraInfoTopic_  = "/camera/rgb/camera_info";

then i run the command:

rosrun ar_bounding_box ar_kinect

and got error message, the service can't be started:

[ INFO] [1330682463.131323897]:     Publish transforms: 1
[ INFO] [1330682463.146369212]:     Publish visual markers: 1
[ INFO] [1330682463.223120422]:     Threshold: 100
[ INFO] [1330682463.243390517]: Marker Pattern Filename: /home/te/ros/roboearth/stacks/roboearth/object_scanning/ar_bounding_box/data/objects_kinect
[ INFO] [1330682463.256355901]: Marker Data Directory: /home/te/ros/roboearth/stacks/roboearth/object_scanning/ar_bounding_box
[ INFO] [1330682463.256521164]: Subscribing to info topic
[ INFO] [1330682463.517989718]: *** Camera Parameter ***
--------------------------------------
SIZE = 640, 480
Distortion factor = 0.000000 0.000000 -0.000000 1.000000
525.00000 0.00000 319.50000 0.00000 
0.00000 525.00000 239.50000 0.00000 
0.00000 0.00000 1.00000 0.00000 
--------------------------------------
[ INFO] [1330682463.518104974]: Opening Data File /home/te/ros/roboearth/stacks/roboearth/object_scanning/ar_bounding_box/data/objects_kinect
[ INFO] [1330682463.518196987]: About to load 6 Models
[ INFO] [1330682463.518231050]: Read in No.1
[ INFO] [1330682463.518678755]: Read in No.2
[ INFO] [1330682463.519101924]: Read in No.3
[ INFO] [1330682463.519506378]: Read in No.4
[ INFO] [1330682463.519930962]: Read in No.5
[ INFO] [1330682463.520328178]: Read in No.6
[ INFO] [1330682465.177885566]: Subscribing to image and cloud topics
**Failed to find a field named: 'rgb'. Cannot convert message to PCL type.
terminate called after throwing an instance of 'pcl::InvalidConversionException'
  what():  Failed to find a field named: 'rgb'. Cannot convert message to PCL type.
Aborted**

When i run the object recording gui, I can see the green polar ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-03-01 23:38:17 -0500

ddimarco gravatar image

This error message (and also the one in rviz) indicates that the pointcloud topic ar_bounding_box subscribes to is the wrong one, i.e. one without RGB information.

Revert your changes and try it like this

rosrun ar_bounding_box ar_kinect /camera/depth_registered/camera_info:=/camera/depth/camera_info /camera/depth_registered/points:=/camera/rgb/points
edit flag offensive delete link more

Comments

now I can start the ar_bounding_box without error. Can I modified the code to : const std::string cameraInfoTopic_ = "/camera/depth/camera_info"; const std::string cloudTopic_ = "/camera/rgb/points"; so i don't have to run the long launch command?

Gemini Ma gravatar image Gemini Ma  ( 2012-03-02 01:06:07 -0500 )edit

Yes, that should work. I just also added a launch file which does the remapping for you, in ar_bounding_box/launch/ar_kinect_turtlebot.launch.

ddimarco gravatar image ddimarco  ( 2012-03-02 01:22:51 -0500 )edit

Nice. I've checked out that launch file. Thanks for the quick response!

Gemini Ma gravatar image Gemini Ma  ( 2012-03-02 01:34:11 -0500 )edit

Question Tools

Stats

Asked: 2012-03-01 22:46:53 -0500

Seen: 594 times

Last updated: Mar 01 '12