Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features added & major rewrite. #42

Open
wants to merge 60 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
5c0970e
Fixed ROS dependencies in CMakeLists.txt and package.xml.
peci1 Aug 31, 2015
5d19a86
Refactoring, added compression and FPS control support.
peci1 Aug 31, 2015
3c6cb0e
Added missing std_msgs dependency to package.xml.
peci1 Aug 31, 2015
8139573
Enabled dynamic_recofigure for compression, FPS and resolution.
peci1 Aug 31, 2015
fefffce
Added support for pausing/resuming the camera stream, and to wake up …
peci1 Sep 2, 2015
a6b146c
Refactored camera wakeup call and checked if the wakeup URL is correct.
peci1 Sep 3, 2015
b379459
Refactored the dynamic reconfigure and message definitions. The old o…
peci1 Sep 7, 2015
94a375f
Moved the API communication and video streaming to separate classes.
peci1 Sep 7, 2015
5bc7217
Improved the camera wakeup behavior.
peci1 Sep 8, 2015
4f272a4
Added support for camera restart.
peci1 Sep 8, 2015
2eece88
Improved backwards compatibility with the original library.
peci1 Sep 8, 2015
137a71e
Renamed streaming.py to video_streaming.py
peci1 Sep 8, 2015
1d40bc2
Refactored camera position streaming to separate module.
peci1 Sep 9, 2015
122dd85
Implemented most of the VAPIX PTZ functions.
peci1 Sep 9, 2015
c0b1fcb
Added dynamic_reconfigure logic to the camera controller.
peci1 Sep 9, 2015
56c963e
Added look_at support.
peci1 Sep 9, 2015
5da4896
Added keyboard teleop node.
peci1 Sep 9, 2015
9fcc198
Fixed dynamic reconfigure issues.
peci1 Sep 10, 2015
4990808
joint_states message is now correctly published in radians.
peci1 Sep 11, 2015
37c2b7f
Added the 3D visual and collision model of the camera. This also enab…
peci1 Sep 11, 2015
679084f
Added the ability to take snapshots.
peci1 Sep 11, 2015
609896a
Now the defaults are set up so that no user authentication is perform…
peci1 Sep 12, 2015
a8a1d5f
Small refactoring, improved documentation.
peci1 Sep 12, 2015
52c075b
Finished documenting and refactoring vapix.py.
peci1 Sep 13, 2015
ddc8a0d
Documented axis.py.
peci1 Sep 13, 2015
0f3b960
VAPIX.get_parameter() was using wrong method to get the API response …
Sep 14, 2015
59d3f37
Fixed some bugs.
Sep 14, 2015
89d1021
Allowed resolutions are now reported in a parameter.
peci1 Sep 22, 2015
0eb2e4c
Documented and refactored video_streaming.py.
peci1 Sep 25, 2015
e14a51f
Documented and refactored camera_control.py.
peci1 Sep 26, 2015
6223c57
Corrected CRLF to LF.
peci1 Sep 26, 2015
1cfc1cd
Documented nodes. Small refactorings.
peci1 Sep 26, 2015
1738568
Fixed some omitted refactorings.
Oct 1, 2015
e61ab42
Fixed typo in launch file.
Oct 1, 2015
d264702
Changed default state publishing frequency to 50 so that TFs are work…
Oct 1, 2015
ebf96a4
Fixed some problematic situations where urllib2 doesn't automatically…
Oct 1, 2015
360bfbb
Fixed some more refactoring bugs. Now everything seems to be working …
Oct 1, 2015
4f44535
Fixed the makefile.
peci1 Oct 2, 2015
d3b830a
Corrected index.rst package name.
peci1 Oct 2, 2015
2ba2b74
Added documentation for the new API.
peci1 Oct 9, 2015
47bdabf
Fixed typo.
peci1 Oct 9, 2015
ce3b7f9
Fixed topic datatypes for focus, iris and brightness.
peci1 Oct 9, 2015
c7ff4c6
Deleted Blender files.
peci1 Oct 13, 2015
f2b1a3b
Improved documentation and set it to be built via Sphinx.
peci1 Oct 14, 2015
e2c830c
Fixed a bug when sending zero pan and tilt velocity prevented the API…
peci1 Oct 30, 2015
c0555d8
Updated the docs to reflect the previous change.
peci1 Nov 2, 2015
695f480
Improved the error message that is being shown when API autodetection…
peci1 Nov 2, 2015
c5fc672
Added the wiki page source to the repository.
peci1 Nov 3, 2015
3d18340
Added a tool that allows for dynamically changing enum domains for dy…
peci1 Nov 5, 2015
e7da4cc
Camera resolutions are now autodetected and not loaded from VideoStre…
peci1 Nov 5, 2015
9b89029
The dynamic reconfigure parameters are only applied when the camera s…
peci1 Nov 6, 2015
cc9c93f
Fixed handling resolutions on startup.
peci1 Nov 24, 2015
8749962
API version detection now distinguishes between v3 versions with firm…
peci1 Dec 12, 2015
0ddb7b4
Finished moving the docs from README to wiki and Sphinx doc pages.
peci1 Dec 12, 2015
413b398
Added ROS diagnostics reporting.
peci1 Feb 24, 2016
2cd9517
Increased tolerance for position stream frequency diagnostics.
peci1 Mar 17, 2016
9be7d6b
Made the driver more robust against ROS time moving backwards.
peci1 May 17, 2016
47e269e
Bumped the version to 0.3.0
May 25, 2016
ea7c4b5
Merge pull request #1 from tradr-project/version_bump
peci1 May 25, 2016
a8eeaa8
Using dynamic diagnostic analyzer.
peci1 Jun 7, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
*.tar.gz
*~
TAGS
axis_214_PTZ_standalone.urdf
doc/html
51 changes: 40 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,59 @@
cmake_minimum_required(VERSION 2.8.3)
project(axis_camera)

find_package(catkin REQUIRED
COMPONENTS
set(THIS_PACKAGE_MESSAGE_DEPS
sensor_msgs
std_msgs
)
# packages which are both build and run dependencies
set(THIS_PACKAGE_DEPS
camera_info_manager_py
diagnostic_aggregator
diagnostic_msgs
diagnostic_updater
dynamic_reconfigure
geometry_msgs
message_generation
rospy
sensor_msgs
std_msgs
tf
${THIS_PACKAGE_MESSAGE_DEPS}
)

find_package(catkin REQUIRED COMPONENTS message_generation xacro ${THIS_PACKAGE_DEPS})
catkin_python_setup()

# ROS message generation
add_message_files(FILES Axis.msg)
generate_messages(DEPENDENCIES geometry_msgs std_msgs)
generate_dynamic_reconfigure_options(cfg/PTZ.cfg)
add_message_files(FILES
PTZ.msg
PointInRectangle.msg
Axis.msg # deprecated
)
add_service_files(FILES
TakeSnapshot.srv
)
generate_messages(DEPENDENCIES ${THIS_PACKAGE_MESSAGE_DEPS})

catkin_package()
generate_dynamic_reconfigure_options(
cfg/Camera.cfg
cfg/VideoStream.cfg
cfg/PTZ.cfg # deprecated
)

# Generate the standalone URDF version.
xacro_add_xacro_file(${CMAKE_CURRENT_SOURCE_DIR}/urdf/axis_214_PTZ_standalone.xacro
${CMAKE_CURRENT_SOURCE_DIR}/urdf/axis_214_PTZ_standalone.urdf)
add_custom_target(axis_camera_media_files_urdf ALL DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/urdf/axis_214_PTZ_standalone.urdf)

catkin_package(CATKIN_DEPENDS message_runtime ${THIS_PACKAGE_DEPS})

install(PROGRAMS
nodes/axis.py
nodes/axis_ptz.py
nodes/publish_axis_tf.py
nodes/teleop.py
nodes/teleop_speed_control.py
nodes/keyboard_teleop.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

install(DIRECTORY launch tests
install(DIRECTORY launch tests meshes urdf
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

install(FILES diag.yaml DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
26 changes: 7 additions & 19 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
Overview
========
Axis camera driver for ROS
==========================

This ROS_ package provides an `Axis network camera`_ driver, written
in Python.
This ROS_ package provides an `Axis network camera`_ driver, written in Python. It provides both a ROS API (via ROS topics and parameters) and Python API (which can be used without having ROS at all).

ROS wiki documentation: `axis_camera`_.
Please see the documentation located here:

This driver is under active development. Its ROS interfaces are
relatively stable, but may still change.
http://wiki.ros.org/axis_camera (ROS API)

There is no released code API.

**Warning**::

The master branch normally contains code being tested for the next
ROS release. It does not always work with previous ROS distributions.
Sometimes, it may not work at all.

Each official release is tagged in the repository. The `change
history`_ describes every version.
http://docs.ros.org/indigo/api/axis_camera/html/ (Python API)

.. _`Axis network camera`: http://www.axis.com/products/video/camera/index.htm
.. _`change history`: https://github.com/clearpathrobotics/axis_camera/blob/master/CHANGELOG.rst
.. _`axis_camera`: http://ros.org/wiki/axis_camera
.. _ROS: http://ros.org
.. _ROS: http://ros.org
24 changes: 24 additions & 0 deletions cfg/Camera.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env python
PACKAGE = "axis_camera"

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

gen.add("autofocus", bool_t, 0, "Autofocus", True)
gen.add("focus", int_t, 0, "Focus", 5000, 1, 9999)

gen.add("brightness", int_t, 0, "Brightness", 5000, 1, 9999)

gen.add("autoiris", bool_t, 0, "Auto iris", True)
gen.add("iris", int_t, 0, "Iris", 5000, 1, 9999)

gen.add("backlight", bool_t, 0, "Backlight compensation (only with autoiris on)", False)

auto_on_off_enum = gen.enum([gen.const("auto", str_t, "auto", "auto (only with autoiris on)"),
gen.const("on", str_t, "on", "on"),
gen.const("off", str_t, "off", "off")],
"IR Cut filter")
gen.add("ircutfilter", str_t, 0, "Infrared cut filter", "auto", edit_method=auto_on_off_enum)

exit(gen.generate(PACKAGE, "axis_driver", "Camera"))
2 changes: 1 addition & 1 deletion cfg/PTZ.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gen = ParameterGenerator()
#gen.add("speed_control", bool_t, 0, "Speed control (true) or absolute position control (false)", False)
gen.add("autofocus", bool_t, 0, "Autofocus", True)
gen.add("pan", double_t, 0, "Pan value in degrees (or percent in absolute mode)", 0, -180, 180)
gen.add("tilt", double_t, 0, "Tilt value in degrees (or percent in absolute mode)", -45, -90, 0)
gen.add("tilt", double_t, 0, "Tilt value in degrees (or percent in absolute mode)", 0, -180, 180)
gen.add("zoom", double_t, 0, "Zoom value", 1, 1, 9999)
gen.add("focus", double_t, 0, "Focus", 1, 1, 9999)
gen.add("brightness", double_t, 0, "Brightness", 1, 1, 9999)
Expand Down
20 changes: 20 additions & 0 deletions cfg/VideoStream.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env python
PACKAGE = "axis_camera"

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

gen.add("use_color", bool_t, 0, "Use color image (not B/W)", True)
gen.add("compression", int_t, 0, "Compression level", 0, 0, 100)
gen.add("fps", int_t, 0, "FPS", 24, 1, 30)

# The resolution enum is filled with values using dynamic_reconfigure_tools.change_enum_items, so that it only offers
# the resolutions supported by the camera in the Properties.Image.Resolution AXIS API parameter.
# This is kind of a hack, but it works at least for ROS and Python APIs (not sure about C++).
resolution_enum = gen.enum([gen.const("4CIF", str_t, "704x576", "4CIF (704x576)")], "Resolution")
gen.add("resolution", str_t, 0, "Image resolution", "704x576", edit_method=resolution_enum)

gen.add("use_square_pixels", bool_t, 0, "Stretch video to fit square pixels", True)

exit(gen.generate(PACKAGE, "axis_driver", "VideoStream"))
Loading