Care-O-Bot: Configuring the Allied Vision Technologies Pike C145 FireWire Camera Pair

To run the AVT Pike C145 cameras of Care-O-bot 3, you must first ensure a proper setup of the camera hardware. At first ensure that the cameras are recognized by your Linux system, executing dmesg. When you now unplug and plugin the firewire cable you shod see some differences in the output, when repeatedly executing the dmesg command. On my pc the dmesg output is after plugging in the cameras is as follows:

$ dmesg | grep 1394

[    1.298395] ohci1394 0000:04:03.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
[    1.358234] ohci1394: fw-host0: OHCI-1394 1.0 (PCI): IRQ=[19]  MMIO=[90300000-903007ff]  Max Packet=[2048]  IR/IT contexts=[8/8]
[    2.644206] ieee1394: Host added: ID:BUS[0-00:1023]  GUID[002332fffe19d87a]
[  159.528932] ieee1394: Node changed: 0-00:1023 -> 0-01:1023
[  160.418182] ieee1394: Node added: ID:BUS[0-00:1023]  GUID[000a470110077026]
[  160.424805] ieee1394: Node added: ID:BUS[0-01:1023]  GUID[000a470110073080]
[  160.424912] ieee1394: Node changed: 0-01:1023 -> 0-03:1023
[  160.438307] video1394: Installed video1394 module
[  160.453156] ieee1394: raw1394: /dev/raw1394 device initialized

If not, make sure the green LEDs of the camera are on and you properly connected the camera to your PC. Additionally you may check with lsmod | grep 1394 that all necessary firewire modules have been loaded. To make sure that you installed all necessary drivers on your system you may also want to install coriander with all its dependencies. Coriander is a handy tool to access all kind of ieee1394 firewire cameras to play with their settings.

Once the camera is recognized by the system, you must create udev rules to get access right to the ieee1394 devices located at /dev/raw1394 and /dev/video1394. Therefore create a file called 01-ieee1394.rules in /etc/udev/rules.d/ with the following content

#firewire camera devices

Check if the Linux groups plugdev and video exist and if not create them. Then, add your Linux user these groups and restart your computer to activate the changes (Maybe you know a better way, to update the udev rules?). To test your cameras, run coriander. If it does not start up, there are still some issues to be solved before proceeding. Check if your user's group settings and the settings of the firewire device files at /dev/raw1394 and /dev/video1394 coincide.

Once coriander is running, we are ready to launch the ROS nodes of the cameras, explained here on the example of Care-O-bot 3 number 1.

  • Install dependencies

rosdep install cob_camera_sensors

and build cob_camera_sensors

rosmake cob_camera_sensors
  • Launch the left IEEE1394 camera with

roslaunch cob_camera_sensors left_cob3-1.launch
  • Launch the right IEEE1394 camera with

roslaunch cob_camera_sensors right_cob3-1.launch
  • Launch image_view from ROS to show images from the left color camera with

rosrun image_view image_view image:=/stereo/left/color_image
  • Launch image_view from ROS to show images from the right color camera with

rosrun image_view image_view image:=/stereo/right/color_image

All cameras are implemented using image_transport from ROS. Therefore, after launching the color camera node you will have the topic available listed in the Code API section.

The AVT Pike color camera implements the polled_camera camera interface from ROS. Within the launch files a poller is started to continuously request images from the color cameras and publish them on the topics.

Notes for Ubuntu 10.10

On newer Ubuntu releases - at least this is the case in my Ubuntu 10.10 installation - a new firewire kernel stack [firewire_core, firewire_ohci] is used and the old firewire kernel modules [raw1394, video1394, ohci1394, ieee1394] are blacklisted. The /dev/raw1394 and video1394-0 devices are not created when using the new stack. Quick and dirty fix:

1) Reboot computer with cameras unplugged.

2) Remove new firewire stack kernel modules:

sudo rmmod firewire_ohci firewire_core 

3) Load the required firewire kernel modules:

sudo modprobe raw1394 
sudo modprobe video1394 
sudo modprobe ohci1394 
sudo modprobe ieee1394

4) Plug in cameras.

5) Check if modules are loaded and device files present:

lsmod | grep 1394
ls /dev/raw1394
ls /dev/video1394*

If the devices are there you should be ready to use the ROS driver for the cameras.

Note: These changes are not permanent; after a reboot the new firewire stack will be loaded again...

Wiki: cob_camera_sensors/AVT_Pike (last edited 2011-10-07 17:06:16 by SebastianHaug)