ros-drivers / axis_camera

Contains basic Python drivers for accessing an Axis camera's MJPG stream. Also provides control for PTZ cameras.
BSD 3-Clause "New" or "Revised" License
52 stars 75 forks source link

Parameter handling fixes #7

Closed jack-oquin closed 11 years ago

jack-oquin commented 11 years ago

Authenticates using urllib2 interfaces. Renames node to "axis_driver". Fixes parameter look-up bugs. Add frame_id parameter.

Fixes issues #3, #7 and #8.

mikepurvis commented 11 years ago

Looks like this means the parameters have to be inside the element. The reason it was the the way it was was so that an axis and axis_ptz could share the same config. Is there a way to preserve that functionality?

jack-oquin commented 11 years ago

Sure.

The previous version did not work with "private" parameters like ~hostname. While fixing that, I broke your use case. I had ignored the PTZ driver, not having any hardware to test it with. So, I didn't notice the reason for the parameter search call.

Just hold off on merging this push until I can add the search call back. I will document and test that it works both ways.

jack-oquin commented 11 years ago

The latest commit fixes the parameter sharing bug. The driver now works with private parameters and with parameters defined in a containing namespace.

To get default values working, I had to check the result from rospy.search_param(), which returns None when the parameter is not defined anywhere.

I made no changes to the PTZ script, since I can't test it. It should work as long as all parameters are explicitly specified. But, I would recommend modifying it similarly.

jack-oquin commented 11 years ago

Mike, please go ahead and merge this pull request, if it looks OK now. The problem you mentioned is fixed.

This version matches the current http://ros.org/wiki/axis_camera documentation.

I'd like to begin working on a new camera_info_manager module without it automatically being included in this request. I would rather not create a separate branch to avoid including it.

mikepurvis commented 11 years ago

This looks great. Thanks, Jack.