ouster-lidar / ouster-ros

Official ROS drivers for Ouster sensors (OS0, OS1, OS2, OSDome)
https://ouster.com
Other
116 stars 139 forks source link

No Topic information of Ros2 #48

Closed jeychandar closed 1 month ago

jeychandar commented 1 year ago

Hi. I tried converting pcap to bag format. I tried generatating pointcloud information but there is no topic information for ros2. It shows error like this . Could you please help me out .Thanks in advance image

Samahu commented 1 year ago

Was the my.bag file recorded using ouster_ros driver (ros1) or was it recorded using a different driver? What happens if you use rosbag info on the file?

jeychandar commented 1 year ago

Hi. I converted pcap to bag using this tool https://github.com/Krishtof-Korda/pcap-to-bag.git. After that I tried to play that error happens. Rosbag info topic information it is showing for ros2 it is not. And I tried to pass the recorded data into ouster_ros master replay it was successfully ran and generated bag file with current timestamp.bag format but still there is no ros2 topic information for that too

Samahu commented 1 year ago

I think the tool you referenced uses ROS1 when performing the conversion. You would need to use ros1 bag utilities to replay the files (i.e you would need to use the command rosbag info and not ros2 bag info). Otherwise, if you still want to use ROS2 utilities to replay the generated bag file then you can try to convert it to ros2 compatible format using the following tool: https://ternaris.gitlab.io/rosbags/topics/convert.html

jeychandar commented 1 year ago

Hi I have tried as you said but it converts ros2 .db3 format. I want to use rosbag_v2 storage id that requires .bag format not sqlite3 storage id. https://github.com/TixiaoShan/LIO-SAM.git. In this repo the sample data works both on rosbag and ros2 .bag format. I used that sample data and run with this repo https://github.com/rsasaki0109/li_slam_ros2.git. So far everything works fine sir. Could you help me out. This will be helpful for me or could you suggest me how to play pcap format files directly.

Samahu commented 1 year ago

Unfortunately, I need to look in depth into this and I am busy building the ros2 driver. So it will be at least another week before I can look into the case. Meanwhile, what I suggest is that could try to replay/stream the pcap file using some tools like tcpreplay or udpreplay and then record the bag file directly from it using your ros toolset and see if you get the proper output.

Note: I haven't tested any of the linked tools.

Samahu commented 1 month ago

Hi @jeychandar, you can utilize any of the two utility scripts supplied in this PR to convert between our ROS1/ROS2 bag file formats (they are not production ready yet but with little changes you can achieve the conversion you like).

Samahu commented 1 month ago

I forgot to link the PR my original post :facepalm: .. appolgies. Here it is https://github.com/ouster-lidar/ouster-ros-extras/pull/2