Skip to content

ROS2 Application Not Able to Get Create3 Odom #42

Answered by drpjm
drpjm asked this question in Q&A
Discussion options

You must be logged in to vote

Turns out this is a sneaky issue: the reason I cannot read odom is that in ROS2 galactic, topic QoS mismatches are not displayed. So, it silently fails when you subscribe to a topic with different QoS. To solve this issue, you should subscribe to the sensor data from the Create3 with:

from rclpy.qos import qos_profile_sensor_data

class SomeNode(Node)
    def __init__(self):
        self.odom_subscriber = self.create_subscription(
            Odometry, "/locobot/mobile_base/odom",
            self._on_odom,
            qos_profile_sensor_data)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by drpjm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant