ros-drivers / ros2_ouster_drivers

ROS2 Drivers for the Ouster OS-0, OS-1, and OS-2 Lidars
https://ouster.com/
Apache License 2.0
139 stars 79 forks source link

Unable to connect with firmware 2.0 #66

Closed MaxandreOgeret closed 3 years ago

MaxandreOgeret commented 3 years ago

Hello,

I use ros dashing. and my Lidar has the firmware 2.0 and a static ip. I have installed the driver using apt. I have configured the yaml file correctly :

ouster_driver:
  ros__parameters:
    lidar_ip: 192.168.3.200
    computer_ip: 192.168.3.100
    lidar_mode: "512x10"
    imu_port: 7503
    lidar_port: 7502
    sensor_frame: laser_sensor_frame
    laser_frame: laser_data_frame
    imu_frame: imu_data_frame

But when I try to run the launch file I get this error :

[INFO] [launch]: All log files can be found below /home/student/.ros/log/2021-01-06-15-50-00-467613-HPZ1-17665
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ouster_driver-1]: process started with pid [17675]
[ouster_driver-1] [INFO] [ouster_driver]: Configuring Ouster driver node.
[ouster_driver-1] [INFO] [ouster_driver]: Connecting to sensor at 192.168.3.200.
[ouster_driver-1] [INFO] [ouster_driver]: Broadcasting data from sensor to 192.168.3.100.
[ouster_driver-1] [ERROR] []: Caught exception in callback for transition 10
[ERROR] [launch_ros.actions.lifecycle_node]: Failed to make transition 'TRANSITION_CONFIGURE' for LifecycleNode '/ouster_driver'
[ouster_driver-1] [ERROR] []: Original error: vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
[ouster_driver-1] [WARN] []: Error occurred while doing error handling.
[ouster_driver-1] [ERROR] [ouster_driver]: Handing error in Ouster driver node.

Any idea what could be the problem ? It works perfectly with ROS1.

Thanks !

SteveMacenski commented 3 years ago

Hi,

If you look at this ticket https://github.com/ros-drivers/ros2_ouster_drivers/issues/42 and this comment https://github.com/ros-drivers/ros2_ouster_drivers/issues/63#issuecomment-742027046 you can see that we do not yet support v2 firmware. I'm open to pull requests to enable it but I have not gotten the cycles to do this yet after the holidays. I hope to have time to sit down and do this in the next 2 weeks but I'm also waiting for some resolution on topics discussed with Ouster in this thread https://github.com/ouster-lidar/ouster_example/issues/164.

Since you have a v2 firmware sensor, it could also be helpful to submit a PR to enable it. I'm not sure the error you should expect to receive if trying to use on V2 firmware.

MaxandreOgeret commented 3 years ago

Hey thanks for your answer. I am willing to spend some time and make PRs for firmware 2.0 compatibility.

I have an OS-1 128 beams available right now, and I see that the issue on ouster repo is about support of 128 beams sensors. Does it change anything for me ?

I will take the time to go through the code soon.

SteveMacenski commented 3 years ago

Nope, in fact you require v2.0 to even use a 128 beam, so its totally on topic. One of the links above I go through the things you'd need to do to make V2 firmware work (mostly copying files around and then updating things that touch them needing it)

MaxandreOgeret commented 3 years ago

I'm starting to work on it. But I noticed that the dashing version is not up to date and my only interest is for dashing at the moment so I think I will start working on the dashing_devel branch. What do you advise me to do ? Why does the dashing version doesn't have the same functionalities ? Is it because something is missing in Dashing ? Thanks. Also here we have an OS1 type but I cannot see anything like this in the ouster_examples

SteveMacenski commented 3 years ago

Because we cannot backport ABI/API breaking changes to already released distributions. If you want all the newest features, you have to use the newer LTS distributions. We can certainly work on getting dashing working on V2 though.

MaxandreOgeret commented 3 years ago

Hey @SteveMacenski, I created the PR https://github.com/ros-drivers/ros2_ouster_drivers/pull/67. It connects and get data but it's not functionnal yet because i'm stuck with the processors but I'm sure most of the job is done. Could you give me a hand in this ? I would really like to finish it !

Thanks !

MaxandreOgeret commented 3 years ago

@SteveMacenski No answer, so I guess it's not worth spending more time on this ?

SteveMacenski commented 3 years ago

It's a very large PR that I haven't had time to review yet. There's enough changes it would take me a couple of hours to really dissect it all (to find some subtle issue why its connecting but not streaming) - typically we like smaller PRs and there's some changes in structs that I didn't expect to be made that I have to track down as well.

It's not been forgotten, its sitting in my queue, but I haven't had the time to dedicate to it yet

MaxandreOgeret commented 3 years ago

Thanks for your answer. Is it worth it for me to spend more time on it ?

SteveMacenski commented 3 years ago

I'd continue to try to get it to work since that's something you need, but I wouldn't do anything just for the sake of the PR until I have a chance to look over it.

MaxandreOgeret commented 3 years ago

We will survive using the ROS1 bridge. Tag me once you had a look and I'll continue with pleasure.

SteveMacenski commented 3 years ago

@MaxandreOgeret I took a look - I would recommend sanity checking that lidar / IMU packet size being set correctly. If that isn't right, it would result in the behavior you've described where there's no data coming out because the packets are messed up.

Can you tell me where you tracked the data down to? Where was it that things stopped working?

Overall things look pretty 1:1 to me, so I think your PR pretty close to "done" once we can get data out of it (and maybe readd the metadata class so we can store that other information)

mnissov commented 3 years ago

Has this fix been shipped for the foxy-devel branch? Experiencing identical problems with an OS0-128

MaxandreOgeret commented 3 years ago

No, I think this PR has been shipped only to the ros2 branch.

mnissov commented 3 years ago

Yeah I think you're right, do you recall any of the code being particular to ros2, I assume this means the rolling distro, wrt to foxy?