Skip to content

Hazard detection node #203

Answered by justinIRBT
gmptrr98 asked this question in Questions
Sep 19, 2022 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

detections is a vector inside the hazard detection message. The frame of the hazard is inside the header of the object in the vector. For something along these lines, see the vector usage in the callback method (this is untested code, so may not work as is):

from irobot_create_msgs.msg import HazardDetectionVector
class MinimalSubscriber(Node):

    def __init__(self):
        super().__init__('minimal_subscriber')
        self.subscription = self.create_subscription(
            HazardDetectionVector,
            'hazard_detection',
            self.listener_callback,
            rclpy.qos.qos_profile_sensor_data)
        self.subscription  # prevent unused variable warning

    def list…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@gmptrr98
Comment options

@justinIRBT
Comment options

@gmptrr98
Comment options

Answer selected by gmptrr98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forum_ros2 Forum post about general ROS 2 usage
2 participants