Skip to content

Commit 8e1848a

Browse files
Add support for Axis cameras (#90)
* Add the initial AxisCamera class with all ROS parameters defined in axis_camera's launch files & nodes * Remove duplicate argument * Add the AxisCamera class to the sensors generator * Add the serial to the axis camera's template * Add serial to the template keys too * Add serial getter/setter. Use empty string as default serial * Refactoring, set the property to the value for the template * frame_width -> width, frame_height -> height * Rename setter * Make the scales & offsets floats by default * Add the TF prefix parameter * Add the camera_info_url parameter * camera_num -> camera * Note that the serial isn't used, fix the name of the PTZ teleop parameter * Add the remaining camera topics to the Topics object * image_raw -> image * Add axis_camera sample * Linting fixes * End docstring with `.`
1 parent 4b4394b commit 8e1848a

File tree

3 files changed

+676
-0
lines changed

3 files changed

+676
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
serial_number: a200-0000
2+
version: 0
3+
sensors:
4+
camera:
5+
- model: axis_camera
6+
urdf_enabled: true
7+
launch_enabled: true
8+
parent: base_link
9+
xyz: [0.0, 0.0, 0.0]
10+
rpy: [0.0, 0.0, 0.0]
11+
ros_parameters:
12+
axis_camera:
13+
hostname: "192.168.131.10"
14+
http_port: 80
15+
username: "root"
16+
password: ""
17+
width: 640
18+
height: 480
19+
fps: 20
20+
tf_prefix: "axis"
21+
camera_info_url: ""
22+
use_encrypted_password : False
23+
camera : 1
24+
ir: False
25+
defog: False
26+
wiper: False
27+
ptz: True
28+
min_pan: -3.141592653589793
29+
max_pan: 3.141592653589793
30+
min_tilt: 0.0
31+
max_tilt: 1.5707963267948966
32+
min_zoom: 1
33+
max_zoom: 24
34+
max_pan_speed: 2.61
35+
max_tilt_speed: 2.61
36+
ptz_teleop: True
37+
button_enable_pan_tilt : -1
38+
button_enable_zoom : -1
39+
axis_pan : 3
40+
axis_tilt : 4
41+
invert_tilt : False
42+
axis_zoom_in: 5
43+
axis_zoom_out: 2
44+
zoom_in_offset: -1.0
45+
zoom_out_offset: -1.0
46+
zoom_in_scale: -0.5
47+
zoom_out_scale: 0.5
48+
scale_pan : 2.61
49+
scale_tilt : 2.61
50+
scale_zoom : 100.0

clearpath_config/sensors/sensors.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
from clearpath_config.common.utils.dictionary import flip_dict
3333
from clearpath_config.sensors.types.sensor import BaseSensor
3434
from clearpath_config.sensors.types.cameras import (
35+
AxisCamera,
3536
BaseCamera,
3637
FlirBlackfly,
3738
IntelRealsense,
@@ -93,12 +94,14 @@ def __new__(cls, model: str) -> BaseIMU:
9394

9495

9596
class Camera():
97+
AXIS_CANERA = AxisCamera.SENSOR_MODEL
9698
FLIR_BLACKFLY = FlirBlackfly.SENSOR_MODEL
9799
INTEL_REALSENSE = IntelRealsense.SENSOR_MODEL
98100
STEREOLABS_ZED = StereolabsZed.SENSOR_MODEL
99101
LUXONIS_OAKD = LuxonisOAKD.SENSOR_MODEL
100102

101103
MODEL = {
104+
AXIS_CANERA: AxisCamera,
102105
FLIR_BLACKFLY: FlirBlackfly,
103106
INTEL_REALSENSE: IntelRealsense,
104107
STEREOLABS_ZED: StereolabsZed,

0 commit comments

Comments
 (0)