Ask Your Question
2

Trouble configuring libdc1394 for Bumblebee2

asked 2012-06-11 09:19:51 -0600

tbernhard gravatar image

updated 2012-06-11 09:22:32 -0600

OS: Ubuntu 11.10
ROS: Fuerte
Camera: Point Grey's Bumblebee2 BB2-08S2M
Other software:
- Columbia University's bumblebee2 ROS package (with a few modifications described below)
- libdc1394-22 (ver. 2.1.3-4)
- Coriander (for checking that the camera can communicate with the computer)

I'm running into errors and I believe they stem from configuring the libdc1394 library. I installed the bumblebee2 package from above, following the excellent tutorial found here. I modified a few parts of the package code to update it to work with Fuerte, which involved a few additional #includes and commenting out the sensor_msgs::Image.set_data_size() function calls, as that function no longer exists. Also, my camera's resolution is 1024x768 @ 20 fps, and I made changes from the tutorial accordingly.

So, when I run the roslaunch camera1394 startcamera.launch, I get the following kicked back from libdc1394:

libdc1394 error: Format_7 Error_flag_1 is set: in _dc1394_v130_handshake (format7.c, line 122): invalid image position, size, color coding or ISO speed

I know that it is possible to get it to work; using Coriander (which makes use of the same library), I've seen stereo images streaming from the camera. I narrowed it down to a call to the function dc1394_format7_set_roi() from dev_camera1394.cpp within the bumblebee2 package. This function appears to set multiple options the specify the camera configuration, and by splitting these up in to separate function calls, I believe it is the color coding that is causing it. My current code:

....
dc1394_format7_set_image_size(camera_, videoMode_, 1024, 768); dc1394_format7_set_packet_size(camera_, videoMode_, DC1394_USE_MAX_AVAIL); dc1394_format7_set_color_coding(camera_, videoMode_, DC1394_COLOR_CODING_RAW16);
....

And the last call there results in the following errors:

libdc1394 error: Format_7 Error_flag_1 is set: in _dc1394_v130_handshake (format7.c, line 122): invalid image position, size, color coding or ISO speed

libdc1394 error: Format_7 Error_flag_1 is set: in dc1394_format7_set_color_coding (format7.c, line 493): F7 handshake failure

So, it appears to be the color coding, but the camera's spec says it uses Raw16. I've tried Raw8 and Mono8 with the same results. Now I'm at a loss. Anyone have any ideas, or experience with Bumblebees and ROS? Thanks, and let me know if more information will help!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2012-06-11 11:27:25 -0600

mjcarroll gravatar image

So, this is more of a placeholder answer for the time being. I'm working on a more long-term fix with more official support.


Short story: Point Grey doesn't want to play nice with the ROS community (or modern Linux distros, in general), if this bothers you, please don't buy their products.

This has been kind of a problem for a while (just search "Bumblebee" on rosanswers or ros-users).


For the autonomous lawnmower, we wanted to be able to use the stereo camera to detect obstacles in an outdoor (read: no Kinect) environment. Here is an example of the data that we were able to achieve using the following method: Bumblebee2 Point Cloud

As it stands, the best way I have found is to start with the Electric camera1394 driver, and modify it for a stereo camera based on this ticket. The patch isn't going to apply cleanly, because it was based on a much older version of camera1394. To take out some of the headache, you can use my pre-modified camera_drivers, which is what was used for the lawnmower (in the previous video).

This modification will allow the stereo deinterlacing to take place, and each camera will be broadcast on it's own topic (along with corresponding CameraInfo). I currently use Format7 for my capture, then use the image_proc pipeline for the rest. Format7 is odd in that you set the frame rate by setting the packet size, which is a supported dynamic_reconfigure parameter, but you will have to do the math yourself using this.

From there, you can do the stereo camera calibration

You can then use image_proc and stereo_image_proc to debayer, bin (to decimate), rectify, disparity, and point clouds. Here's an example pipeline from the lawnmower

So, I hope this helps you for now, until I can get something more permanent in.

edit flag offensive delete link more

Comments

Thanks for the help! I first tried your driver, but compilation fails because it cannot find camera_info_manager/camera_info_manager.h . Was there something I missed? I'll start messing with the Electric drivers as an alternative

tbernhard gravatar imagetbernhard ( 2012-06-12 07:51:13 -0600 )edit

It's probably due to it being based on Electric. I'm bringing up a 12.04/Fuerte install as I type this, so I'll look into it for you.

mjcarroll gravatar imagemjcarroll ( 2012-06-13 05:34:34 -0600 )edit

Sorry for the delay. Okay, it builds against Fuerte, but I don't have any hardware to test it out. Can you give it a shot and see what happens for me?

mjcarroll gravatar imagemjcarroll ( 2012-06-26 14:46:11 -0600 )edit
0

answered 2012-06-21 07:07:02 -0600

mazkarate gravatar image

OS: Ubuntu 12.04 ROS: Fuerte Camera: Point Grey's Bumblebee2 BB2-08S2C Other software: - Columbia University's bumblebee2 ROS package (with the same modifications described above) & also have tried with another bumblebee2 package (very similar) that is specified in that same excellent tutorial - libdc1394-22 (ver. 2.2.0-2) - Coriander (have already checked camera output, works fine)

I am stuck in the linking process of the package and cannot get a successful built. Here is the error:

/opt/ros/fuerte/stacks/image_common/camera_calibration_parsers/lib/libcamera_calibration_parsers.so: undefined reference to `YAML::Emitter::PreWriteStreamable(std::basic_stringstream<char, std::char_traits<char="">, std::allocator<char> >&)'

Prior to this error I fixed another bug in the dependencies of the cam_info_manager package as it depended on the yaml-cpp package and as it is said here this package is integrated in the common_rosdeps of ROS since electric. So I edited the manifest file as said there and I could rosmake the cam_info_manager without getting the non-existent package error. I don't know if this may have any influence in the error that I am trying to solve now but just in case.

edit flag offensive delete link more

Comments

Not sure if this helps, but how did you change your dependencies? I had to edit my stack.xml within .../bumblebee2/camera_drivers_experimental, changing the <rosdep name="yaml-cpp" /> to <depend stack="common_rosdeps" />. I believe that was my only issue relating to yaml

tbernhard gravatar imagetbernhard ( 2012-06-21 08:12:22 -0600 )edit

I edited the makefile.xml (ROS documentation link) and the stack.xml as you say there and nothing, I keep getting that same error...it's actually the linking process that fails not the compilation. any other ideas?

mazkarate gravatar imagemazkarate ( 2012-06-22 02:53:28 -0600 )edit

Sorry, I'm not too familiar with the internals of the driver. But I'd recommend opening a separate question, as your issue is different. It's probably the best way to get your issue addressed.

tbernhard gravatar imagetbernhard ( 2012-06-22 03:40:33 -0600 )edit

I was writing a new post to discuss this issue and I found the solution while writing it! I had to add to the CmakeLists.txt of the camera1394 package the following command: target_link_libraries(${PROJECT_NAME} yaml-cpp) Which is explained here: http://www.ros.org/wiki/yaml_cpp

mazkarate gravatar imagemazkarate ( 2012-06-25 05:01:17 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-06-11 09:19:51 -0600

Seen: 1,568 times

Last updated: Jun 29 '12