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

laser_scan topic no data published #237

Closed
kennyS99 opened this issue Oct 17, 2023 · 6 comments
Closed

laser_scan topic no data published #237

kennyS99 opened this issue Oct 17, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@kennyS99
Copy link

Describe the bug
I've encountered a bug where the /ouster/scan topic does not seem to publish any data.
Here is the screenshot of the RVIZ that only subscribes to the topic of /scan:
Screenshot from 2023-10-17 20-23-59

I checked the pointClound2 publish, and it is working. here is the screenshot.
Screenshot from 2023-10-17 20-27-12

Also, I attempted to run ros2 echo topic /ouster/scan. and the output is here:
ouster.txt

It seems like there is no data that has been published here. Additionally, I am pretty sure that the variable of proc_mask has been added with SCAN. cuz when I run ros2 topic list, I can see the /ouster/scan will come with the output.
declare_parameterstd::string("proc_mask", "IMU|IMG|PCL|SCAN");

To Reproduce
Steps to reproduce the behaviour (steps below are just an example):
ros2 launch ouster_ros driver.launch.py

Platform (please complete the following information):

  • Ouster Sensor? OS-1
  • Ouster Firmware Version? firmware 2.0
  • ROS version/distro? ros2 rolling
  • Operating System? \ Linux with ubuntu docker 22.04
  • Machine Architecture? \ x64
  • git commit hash (if not the latest). i think that I am using the default one.
    If there is any possible solution gonna be very helpful for me. I appreciate your help.
@kennyS99 kennyS99 added the bug Something isn't working label Oct 17, 2023
@Samahu Samahu self-assigned this Oct 17, 2023
@Samahu
Copy link
Contributor

Samahu commented Oct 17, 2023

Did you set the value of scan_ring parameter to a value other than zero? It is not required but I am wondering that you sensor could be setting on a table and most of the lower beam hit very close such that the sensor is returning zeros for the range value. So if you have an OSx-64 sensor you typically want to set scan_ring to 32, and to 64 if you had an OSx-128 sensor.

Hope this helps!

@kennyS99
Copy link
Author

Hello Samahu,
Thank you for your prompt response. I attempted the solution you provided today. I'm uncertain about the OSx-64 reference, so I experimented with various values for the scan_ring parameter in the YAML file, including 32 and 64.

Result:
The output from the /ouster/scan topic appears to be functioning as expected now. Please refer to the attached file for details.
ouster.txt

However, I'm facing an issue with rviz2. Even after adding a scan module to subscribe to the /scan topic, it's not being visualized correctly in rviz2.
Screenshot from 2023-10-18 15-44-44

The pointClound2 topic has been working as a reference before.

@Samahu
Copy link
Contributor

Samahu commented Oct 18, 2023

In PR #203 (which is still WIP) I have added a LidarScan object to the rviz config.. You could double check if there is anything essential different than yours. One thing to keep an eye on is that in order for the /ouster/scan topic to appear correctly, RVIZ configuration should match with the topic QoS setting.

@kennyS99
Copy link
Author

Thank you for your continuous support. After updating my Rviz configuration file, I can now visualize the 2D LaserScan in Rviz.

However, I've encountered an alignment issue that you mentioned previously. Specifically, I believe I'm experiencing a similar issue to what was described in #196. In my case, the offset between the pointCloud and the laser scan is significant, almost 180 degrees. This discrepancy is quite concerning.
Screenshot

Are you still working on this problem? I'm keen to know if other users are experiencing the same discrepancy, or if it's unique to my setup.

Best regards,

@lowellausen
Copy link

Hi @kennyS99 ! Another user here. We have faced that issue as well; the thing is that the LaserScan data is, currently, not actually being transformed into it's reference frame, whereas the PointCLoud data is being transformed.
I have recently opened an issue and a not-so-beautiful PR about it (#235 #236). And this is the original issue about it: #186

There's an even uglier way to workaround this and that is setting, in you config file, your lidar_frame to be the same as your sensor_frame. That surely messes up your tf tree a bit but they will align 😂

@Samahu
Copy link
Contributor

Samahu commented Nov 29, 2023

Resolved by #203

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

3 participants