Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
RoboQualityHardware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RoboCT (Public)
RoboQuality
RoboQualityHardware
Commits
b390ee00
Commit
b390ee00
authored
8 months ago
by
Simon Wittl
Browse files
Options
Downloads
Patches
Plain Diff
fixed hardware added reachability
parent
981730b0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
rq_hardware/artist/artist_harware_service.py
+1
-1
1 addition, 1 deletion
rq_hardware/artist/artist_harware_service.py
rq_hardware/base_hardware_service.py
+3
-5
3 additions, 5 deletions
rq_hardware/base_hardware_service.py
rq_hardware/hardware_client.py
+2
-2
2 additions, 2 deletions
rq_hardware/hardware_client.py
with
6 additions
and
8 deletions
rq_hardware/artist/artist_harware_service.py
+
1
−
1
View file @
b390ee00
...
...
@@ -66,7 +66,7 @@ class ArtistHardwareInterface(BaseHardwareInterfaceService):
def
check_reachability_callback
(
self
,
request
:
ReachabilityCheck
.
Request
,
response
:
ReachabilityCheck
.
Response
):
self
.
get_logger
().
info
(
'
Pose to check ...
'
)
# include some logic
response
.
checked_scan_pose
.
scan_pose
=
request
.
scan_pose
response
.
checked_scan_pose
.
reachable
=
True
...
...
This diff is collapsed.
Click to expand it.
rq_hardware/base_hardware_service.py
+
3
−
5
View file @
b390ee00
...
...
@@ -11,7 +11,7 @@ class BaseHardwareInterfaceService(Node):
def
__init__
(
self
,
node_name
:
str
=
'
rq_base_hardware_interface_service
'
):
super
().
__init__
(
node_name
)
self
.
srv
=
self
.
create_service
(
AquireProjection
,
'
aquire_projection
'
,
self
.
aquire_projection_callback
)
self
.
srv
=
self
.
create_service
(
AquireProjection
,
'
reachability
_check
'
,
self
.
reachability_
check_
callback
)
self
.
srv
=
self
.
create_service
(
ReachabilityCheck
,
'
check_
reachability
'
,
self
.
check_
reachability_callback
)
self
.
projection_publisher
=
self
.
create_publisher
(
Image
,
'
current_projection_image
'
,
5
)
self
.
projection_geometry_publisher
=
self
.
create_publisher
(
ProjectionGeometry
,
'
current_projection_geometry
'
,
5
)
...
...
@@ -22,11 +22,9 @@ class BaseHardwareInterfaceService(Node):
response
:
AquireProjection
.
Response
):
raise
NotImplementedError
def
reachability_
check_
callback
(
self
,
def
check_
reachability_callback
(
self
,
request
:
ReachabilityCheck
.
Request
,
response
:
ReachabilityCheck
.
Response
):
raise
NotImplementedError
s
\ No newline at end of file
\ No newline at end of file
This diff is collapsed.
Click to expand it.
rq_hardware/hardware_client.py
+
2
−
2
View file @
b390ee00
...
...
@@ -15,7 +15,7 @@ class HardwareClient(Node):
self
.
cli_projection
=
self
.
create_client
(
AquireProjection
,
'
aquire_projection
'
)
while
not
self
.
cli_projection
.
wait_for_service
(
timeout_sec
=
1.0
):
self
.
get_logger
().
info
(
'
projection service not available, waiting again...
'
)
self
.
cli_reachability
=
self
.
create_client
(
ReachabilityCheck
,
'
reachability
_check
'
)
self
.
cli_reachability
=
self
.
create_client
(
ReachabilityCheck
,
'
check_
reachability
'
)
while
not
self
.
cli_projection
.
wait_for_service
(
timeout_sec
=
1.0
):
self
.
get_logger
().
info
(
'
reachability service not available, waiting again...
'
)
...
...
@@ -30,7 +30,7 @@ class HardwareClient(Node):
def
check_reachability
(
self
,
projection
:
PyProjection
)
->
rclpy
.
Future
:
self
.
req_reachability
.
scan_pose
=
projection
.
as_message
()
return
self
.
cli_
projection
.
call_async
(
self
.
req_reachability
)
return
self
.
cli_
reachability
.
call_async
(
self
.
req_reachability
)
@staticmethod
def
projection_response_2_py
(
response
:
AquireProjection
.
Response
)
->
PyProjection
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment