Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with /diff_drive/scan and /diff_drive/odometry Topics Returning Zero or Infinity Values #38

Open
DWDROME opened this issue Jan 2, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@DWDROME
Copy link

DWDROME commented Jan 2, 2025

Hi,

I am encountering an issue with my setup where the values published on the /diff_drive/scan and /diff_drive/odometry topics are either 0 or infinity (inf). This occurs when I try to echo these topics using the following commands:

ros2 topic echo /diff_drive/scan
ros2 topic echo /diff_drive/odometry

The expected output should be valid sensor data and odometry information, but instead, I receive values of 0 or inf, which seems incorrect.

Environment:

  • ROS 2 Jazzy
  • Gazebo Harmonic
  • ros_gz_project_template setup for SLAM and robot simulation

Troubleshooting:

  • I have tried using both gz topic and ros2 topic to check the /diff_drive/scan and /diff_drive/odometry topics, and both methods return 0 or inf.
  • I suspect this issue may be related to time synchronization, but I am unsure if that's the cause.
  • I have also checked that the remappings are correct in the Cartographer configuration file, but the issue persists.

Steps to Reproduce:

  1. Launch the simulation with Gazebo and Cartographer.
  2. Run the following command to echo the topics:
    ros2 topic echo /diff_drive/scan
    ros2 topic echo /diff_drive/odometry
  3. Observe the output showing only 0 or inf.

Any suggestions or guidance would be greatly appreciated!

Thank you for your time and support.

Best regards,
陈梓洋

@DWDROME DWDROME added the bug Something isn't working label Jan 2, 2025
@DWDROME
Copy link
Author

DWDROME commented Jan 2, 2025

sorry,here is the Correction
Issue Details:
Gazebo (gz): The /diff_drive/scan and /diff_drive/odometry topics in Gazebo return the expected values (valid sensor data and odometry).
ROS 2 (ros2 topic echo): In ROS 2, when I try to echo the same topics, I get values of 0 or inf, which seems incorrect.
Troubleshooting:
I've checked that the remappings in the Cartographer configuration are correct, but the issue persists in ROS 2.
I suspect it could be an issue related to time synchronization between Gazebo and ROS 2, but I am unsure if that's the root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant