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

Grasshopper2 camera doesn't switch off

asked 2012-01-02 05:54:48 -0500

Enrique gravatar image

updated 2012-01-02 06:17:45 -0500

The camera1394 driver seems to leave the Point Grey Grasshopper2 (IEEE 1394b version) ON after it is stopped (roscore included).

I say it seems because the camera case is hot after I stop the driver. Yes, that's how I know it remains ON. If you know, by the way, of any other way to check to power state of the camera (or the firewire bus), please, let me know.

With coriander the camera case goes to ambient temperature after I exit coriander (actually I press the power OFF button before exit), so it seems it's switching the camera off correctly.

Does anybody else experienced a similar problem/behaviour?

How can I fix it? Should I touch the camera1394 (pkg) driver?

edit retag flag offensive close merge delete

Comments

Regarding the way I check the camera power state, I've just realized that the camera LED provides that information. It confirms that the camera is power ON. I'd say it's also in streaming mode. In coriander, when no image is displayed, the LED blinks green. When power OFF it's red/green.
Enrique gravatar image Enrique  ( 2012-01-02 06:01:06 -0500 )edit
Regarding a fix to power OFF the camera, would it be enough if I add: dc1394_camera_set_power( camera_, DC1394_OFF ) to dev_camera1394.cpp:354 (located in src/nodes of camera1394 pkg)? Is there any side effect?
Enrique gravatar image Enrique  ( 2012-01-02 06:35:53 -0500 )edit
Worth a try. Please let me know if it works for the Grasshopper2.
joq gravatar image joq  ( 2012-01-02 06:54:35 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-01-02 07:32:16 -0500

Enrique gravatar image

I've successfully applied the easy fix I mentioned above to power OFF the camera on exit. Now, at least for my Grasshopper2, the LED turns red/green (power OFF state) and the camera cools down.

For more details see this ticket and the patch file attached to it.

Here you have the output of the diff command I run to create the patch file

--- dev_camera1394.cpp.bak      2012-01-02 20:56:08.306350703 +0000
+++ dev_camera1394.cpp  2012-01-02 21:12:34.778337485 +0000
@@ -350,6 +350,7 @@
     {
       format7_.stop();
       dc1394_capture_stop(camera_);
+      dc1394_camera_set_power(camera_, DC1394_OFF);
       dc1394_camera_free(camera_);
       camera_ = NULL;
     }
By the way, I run this command
diff -u dev_camera1394.cpp.bak dev_camera1394.cpp > dev_camera1394.cpp.patch
edit flag offensive delete link more
2

answered 2012-01-02 06:49:21 -0500

joq gravatar image

updated 2012-01-02 06:50:06 -0500

On shutdown, the camera1394 driver sets video transmission off, stops capturing frames, and frees the libdc1394 resources. It currently does not attempt to power off the device.

Although coriander documentation says "few cameras support the on/off feature", camera1394 could support it for those that do. If you think it should, please open a Trac ticket for camera_drivers. There is time to make that change for the coming Fuerte release.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-01-02 05:54:48 -0500

Seen: 388 times

Last updated: Jan 02 '12