Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
larm-astro
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Inès EL HADRI
larm-astro
Commits
8b7e5c2c
Commit
8b7e5c2c
authored
Jan 22, 2024
by
Inès EL HADRI
💤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move depth radius check variable to ROS param
parent
52c0831f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
cam_vision
grp_astro/src/cam_vision
+13
-2
No files found.
grp_astro/src/cam_vision
View file @
8b7e5c2c
...
...
@@ -40,6 +40,14 @@ class CameraVision(CameraDriver):
print
(
"Set HSV params to default values :
\n
- low : {self._low}
\n
- high {self._high}"
)
# Node parameters
self
.
declare_parameters
(
namespace
=
''
,
parameters
=
[
(
'DEPTH_CHECK_RADIUS'
,
10
)
])
# Node variables
self
.
_kernel
=
np
.
ones
((
5
,
5
),
np
.
uint8
)
self
.
_color_info
=
(
0
,
0
,
255
)
...
...
@@ -165,7 +173,7 @@ class CameraVision(CameraDriver):
def
pixelToRelativePos
(
self
,
x
,
y
):
# Calculation of the depth value
color_intrin
=
self
.
_color_frame
.
profile
.
as_video_stream_profile
()
.
intrinsics
D_RADIUS
=
10
D_RADIUS
=
self
.
paramInt
(
'DEPTH_CHECK_RADIUS'
)
front_dist
=
[]
lateral_dist
=
[]
...
...
@@ -185,6 +193,9 @@ class CameraVision(CameraDriver):
return
xDist
,
yDist
def
paramInt
(
self
,
name
):
return
self
.
get_parameter
(
name
)
.
get_parameter_value
()
.
integer_value
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment