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

error namespace

parent 7024e82c
No related branches found
No related tags found
No related merge requests found
git+https://github.com/filippocastelli/pyometiff git+https://github.com/filippocastelli/pyometiff
git+https://github.com/harisankar95/pathfinding3D git+https://github.com/harisankar95/pathfinding3D
git+https://github.com/wittlsn/aRTist-PythonLib/ git+https://mygit.th-deg.de/roboct-public/artist-api
\ No newline at end of file \ No newline at end of file
import artistlib.hardware
import rclpy.publisher import rclpy.publisher
from rq_interfaces.srv import ReachabilityMapCheck, AquireProjection, ReachabilityCheck from rq_interfaces.srv import ReachabilityMapCheck, AquireProjection, ReachabilityCheck
from rq_interfaces.msg import Volume from rq_interfaces.msg import Volume
...@@ -7,8 +5,9 @@ from ..base_hardware_service import BaseHardwareInterfaceService ...@@ -7,8 +5,9 @@ from ..base_hardware_service import BaseHardwareInterfaceService
from rq_controller.common import PyProjection, PyRegionOfIntrest, PyVolume from rq_controller.common import PyProjection, PyRegionOfIntrest, PyVolume
try: try:
import artistlib import artist_pythonlib
from artistlib import utility as artist_utility from artist_pythonlib import utility as artist_utility
import artist_pythonlib.hardware
except ModuleNotFoundError: except ModuleNotFoundError:
raise ModuleNotFoundError("aRTist API not found") raise ModuleNotFoundError("aRTist API not found")
...@@ -51,9 +50,9 @@ class ArtistHardwareInterface(BaseHardwareInterfaceService): ...@@ -51,9 +50,9 @@ class ArtistHardwareInterface(BaseHardwareInterfaceService):
:param node_name: The name of the node. Defaults to 'rq_hardware_interface_service'. :param node_name: The name of the node. Defaults to 'rq_hardware_interface_service'.
""" """
super().__init__(node_name) super().__init__(node_name)
self.api = artistlib.API() self.api = artist_pythonlib.API()
self.source = artistlib.hardware.XraySource(self.api) self.source = artist_pythonlib.hardware.XraySource(self.api)
self.detector = artistlib.hardware.XrayDetector(self.api) self.detector = artist_pythonlib.hardware.XrayDetector(self.api)
self.mesh_publisher = self.create_publisher( self.mesh_publisher = self.create_publisher(
Mesh, "rq_artist_collision_mesh_mm", 10 Mesh, "rq_artist_collision_mesh_mm", 10
) )
......
...@@ -35,7 +35,7 @@ class BaseHardwareInterfaceService(Node): ...@@ -35,7 +35,7 @@ class BaseHardwareInterfaceService(Node):
:param node_name: The name of the node. Defaults to 'rq_base_hardware_interface_service'. :param node_name: The name of the node. Defaults to 'rq_base_hardware_interface_service'.
""" """
super().__init__(nodename, namespace="rq") super().__init__(nodename)
self.aquire_projection_srv = self.create_service( self.aquire_projection_srv = self.create_service(
AquireProjection, "aquire_projection", self.aquire_projection_callback AquireProjection, "aquire_projection", self.aquire_projection_callback
......
...@@ -21,7 +21,7 @@ class HardwareClient(Node): ...@@ -21,7 +21,7 @@ class HardwareClient(Node):
:param kwargs: Additional keyword arguments to pass to the Node initialization. :param kwargs: Additional keyword arguments to pass to the Node initialization.
""" """
super().__init__("rq_hardware_client", namespace="rq", **kwargs) super().__init__("rq_hardware_client", **kwargs)
self.cli_projection = self.create_client(AquireProjection, "aquire_projection") self.cli_projection = self.create_client(AquireProjection, "aquire_projection")
while not self.cli_projection.wait_for_service(timeout_sec=1.0): while not self.cli_projection.wait_for_service(timeout_sec=1.0):
self.get_logger().info("projection service not available, waiting again...") self.get_logger().info("projection service not available, waiting again...")
......
No preview for this file type
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