-
Notifications
You must be signed in to change notification settings - Fork 78
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
OS0-128 pointcloud rotated 180 deg #87
Comments
@mnissov What about the translations? Which translations should we use? as given in the software manual or in this driver which are 0, 0, 0 with respect to each other. |
If you are rotating the laser_sensor_frame by 180 degrees then you also need to rotate imu_data_frame by 180 degrees.
I am also displaying my URDF file for reference. Here the laser_sensor_frame is at the the same position(translation) as the sensor frame in the ouster manual just 180 degrees rotated. parent link="laser_sensor_frame" parent link="laser_sensor_frame" |
So i wasn't really intending on fixing the problem myself. This bug to me seems indicative of some error deeper in the driver and I was hoping this could lead to a solution. But yes, you're right that if one were to make a basic solution then one would need to rotate both the laser and imu frames accordingly. Regarding translations, i just followed the recommendations from the software manual. |
Ok thanks for your reply. Let's see what @SteveMacenski has to say in this. |
Do you see this in ROS 1 using the ouster example repo? We use the same In ROS however, positive X axis should be forward, regardless of what Ouster's documentation says. That's the documentation for if you connect to the sensor what you get out of it, that is not related to any packages that get the data out and populate it into another ecosystem (like ROS) which have their own standard conventions to ensure drop-in replacability of sensors from many vendors. Though its hard for me to look at pictures without ground truth to tell if that's what's going on here or not. Either way, the perceived bug is probably in the client code when buffering data, which would be an Ouster Client issue, not a ROS 2 driver issue. |
The ROS1 driver works as expected. Looking at sensor output from the ros1 and ros2 driver the two pointclouds are offset 180 degrees. Regarding coordinate frames, I'm not quite sure what you mean by "regardless of what Ouster's documentation says". If the I'll try and make the comparison more clear one of the following days. Edit: Regarding the images, the only thing to see is me approaching the sensor. I know there is noise in the background and from the ground, but the only points was that I approached the sensor on the connector side. As has some expectation of how the pointcloud is represented with respect to the |
Huh, that is interesting then. They should be the same since they use the same buffering logic on the packets to build the pointclouds https://github.com/ros-drivers/ros2_ouster_drivers/blob/galactic/ros2_ouster/include/ros2_ouster/processors/pointcloud_processor.hpp#L90. Maybe its just TF is being submitted incorrectly rather than the data being in the wrong order? That would be an easy fix. But again, it looks like we simply use what the client provides us from the sensor https://github.com/ros-drivers/ros2_ouster_drivers/blob/galactic/ros2_ouster/src/ouster_driver.cpp#L186 The +X should be forward on the laser frame by ROS conventions. If that is the same as Ouster docs, then A-OK on that. But if they are different, we follow ROS conventions for ROS drivers to make sure that sensors are all drop-in replaceable. |
I looked into the transform as described in #84 an it seemed to be fine. Also, looking at rviz using FramesMy point with the frames is purely just that there are more than one in the Ouster, and they aren't all aligned. In the ros2 driver you have defined I was just trying to relate the terminology in the driver to the manual such that my expectation regarding the visualization was justified, i.e. object near LIDAR cable connector -> positive x-axis in |
The fix in #84 looks good to me. Sorry, I've also been on PTO so just catching up now. |
Sorry for the misunderstanding. The fix in #84 only effects the translation and not the problem with the rotation. But the transforms published in that cpp file look to be matching to the software manual. In an earlier message I said I would make a comparison between ros1/ros2 to highlight the problem, we no longer have this LIDAR so I won't be able to do that for the foreseeable future. |
@SteveMacenski, we were able to source some ouster lidars again. So I'm returning with a demonstration of my aforementioned problem w/ ros1 and ros2 demos. Sensor Frame DefinitionHere is the I assume this should be what is referred to by Physical SetupThis is the physical setup ROS2
|
Appendixros2 config
ros1 launch
|
This has been discussed slightly in #84 but I figured the discussion has drawn out to the point where it deserves a a dedicated post with demonstration.
The problem is that the
/points
are not given correctly according to the coordinate frames from the software manual.Bug
Case Setup: There are some objects in the background but, the object of interest will be me standing in front of the lidar on the connector side. According to the documentation this would mean I am standing on the positive x axis in
lidar_frame
and negative x axis insensor_frame
.We can see the points are posted in
lidar_frame
by$ ros2 topic echo /points --field header stamp: sec: 5302 nanosec: 2350300 frame_id: laser_data_frame
so the points are expressed in
lidar_frame
. Then, looking at the visualization in rviz one can see that I am placed oppositely to what one would expect. That is to say, in positive x axis insensor_frame
and negative x axis inlidar_frame
despite standing in front of the connector.Expectation
My expectation is that the point cloud would be rotated 180 deg about the z axis, such I am visualized standing along the positive x axis in
lidar_frame
and negative x axis insensor_frame
.SW
I am running ubuntu 20.04 LTS, with ros galactic and the newest version of
ros2_ouster_drivers
installed bysudo apt install ros-galactic-ros2-ouster
. The lidar is OS0-128 running version v2.1.1.The text was updated successfully, but these errors were encountered: