Skip to content
Snippets Groups Projects
Commit b390ee00 authored by Simon Wittl's avatar Simon Wittl
Browse files

fixed hardware added reachability

parent 981730b0
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment