facontidavide / PlotJuggler

The Time Series Visualization Tool that you deserve.
https://www.plotjuggler.io
Mozilla Public License 2.0
4.43k stars 618 forks source link

'No parser available for encoding [cdr] nor [ros2msg]' after mcap conversion from ros2 db3 bag #878

Open lucasw opened 1 year ago

lucasw commented 1 year ago

Problem description

I converted a ros2 db3 to mcap using mcap convert which results in this error when trying to load in Plotjuggler:

No parser available for encoding [cdr] nor [ros2msg]

Then similar for a ros1 bag:

No parser available for encoding [ros1] nor [ros1msg]

The mcap files report as

mcap info *mcap
library:   mcap go v1.0.4                                              
profile:   ros2                                                        

That's using a version of the mcap cli tool built from latest source (should I go to an older version, a release like https://github.com/foxglove/mcap/commit/91b3a9f41ee967d079ce964119b6f004e97d8c0e ?).

The ros2 mcap works fine with ros2 bag play, I can echo topics and view a pointcloud in rviz2.

Steps to reproduce (important)

git clone git@github.com:foxglove/mcap.git
cd mcap/go
make -C cli/mcap build
# mcap binary is now mcap/go/cli/mcap/bin/mcap

Using data from https://github.com/linklab-uva/RACECAR_DATA

# some missing steps here getting the right message definitions so the db3 can be read, could fill them in if needed 
cd S11/T-SOLO-PYLON
mcap convert T-SOLO-PYLON.db3 T-SOLO-PYLON.mcap
mcap filter --end-secs 1635011301 T-SOLO-PYLON.mcap -o T-SOLO-PYLON_truncated.mcap

T-SOLO-PYLON_truncated.zip

$ mcap info T-SOLO-PYLON_truncated.mcap
library:   mcap go v1.0.4                                              
profile:   ros2                                                        
messages:  2155                                                        
duration:  999.696818ms                                                
start:     2021-10-23T10:48:20.000173913-07:00 (1635011300.000173913)  
end:       2021-10-23T10:48:20.999870731-07:00 (1635011300.999870731)  
compression:
    zstd: [6/6 chunks] [23.67 MiB/15.75 MiB (33.47%)] [15.76 MiB/sec] 
channels:
    (1)  /vehicle_3/luminar_points                              17 msgs (17.01 Hz)    : sensor_msgs/msg/PointCloud2 [ros2msg]                         
    (2)  /vehicle_3/novatel_bottom/bestpos                      19 msgs (19.01 Hz)    : novatel_oem7_msgs/msg/BESTPOS [ros2msg]                       
    (3)  /vehicle_3/novatel_bottom/bestvel                      21 msgs (21.01 Hz)    : novatel_oem7_msgs/msg/BESTVEL [ros2msg]                       
    (4)  /vehicle_3/novatel_bottom/rawimu                      125 msgs (125.04 Hz)   : novatel_oem7_msgs/msg/RAWIMU [ros2msg]                        
    (5)  /vehicle_3/novatel_top/bestpos                         20 msgs (20.01 Hz)    : novatel_oem7_msgs/msg/BESTPOS [ros2msg]                       
    (6)  /vehicle_3/novatel_top/bestvel                         21 msgs (21.01 Hz)    : novatel_oem7_msgs/msg/BESTVEL [ros2msg]                       
    (7)  /vehicle_3/novatel_top/rawimu                         125 msgs (125.04 Hz)   : novatel_oem7_msgs/msg/RAWIMU [ros2msg]                        
    (8)  /vehicle_3/radar_front/esr_status1                      1 msgs (1.00 Hz)     : delphi_esr_msgs/msg/EsrStatus1 [ros2msg]                      
    (9)  /vehicle_3/radar_front/esr_status2                      1 msgs (1.00 Hz)     : delphi_esr_msgs/msg/EsrStatus2 [ros2msg]                      
    (12) /vehicle_3/radar_front/esr_status5                      7 msgs (7.00 Hz)     : delphi_esr_msgs/msg/EsrStatus5 [ros2msg]                      
    (13) /vehicle_3/radar_front/esr_status7                      7 msgs (7.00 Hz)     : delphi_esr_msgs/msg/EsrStatus7 [ros2msg]                      
    (14) /vehicle_3/radar_front/esr_status8                      6 msgs (6.00 Hz)     : delphi_esr_msgs/msg/EsrStatus8 [ros2msg]                      
    (15) /vehicle_3/radar_front/esr_status9                      6 msgs (6.00 Hz)     : delphi_esr_msgs/msg/EsrStatus9 [ros2msg]                      
    (16) /vehicle_3/radar_front/esr_track                        6 msgs (6.00 Hz)     : delphi_esr_msgs/msg/EsrTrack [ros2msg]                        
    (17) /vehicle_3/radar_front/esr_valid1                       3 msgs (3.00 Hz)     : delphi_esr_msgs/msg/EsrValid1 [ros2msg]                       
    (18) /vehicle_3/radar_front/esr_valid2                       5 msgs (5.00 Hz)     : delphi_esr_msgs/msg/EsrValid2 [ros2msg]                       
    (19) /vehicle_3/radar_front/esr_vehicle1                    28 msgs (28.01 Hz)    : delphi_esr_msgs/msg/EsrVehicle1 [ros2msg]                     
    (20) /vehicle_3/radar_front/esr_vehicle2                    28 msgs (28.01 Hz)    : delphi_esr_msgs/msg/EsrVehicle2 [ros2msg]                     
    (21) /vehicle_3/radar_front/radar_visz_moving                1 msgs (1.00 Hz)     : visualization_msgs/msg/Marker [ros2msg]                       
    (23) /vehicle_3/radar_left/detection                       578 msgs (578.18 Hz)   : delphi_mrr_msgs/msg/Detection [ros2msg]                       
    (24) /vehicle_3/radar_left/header_information_detections    33 msgs (33.01 Hz)    : delphi_mrr_msgs/msg/MrrHeaderInformationDetections [ros2msg]  
    (25) /vehicle_3/radar_left/marker                          579 msgs (579.18 Hz)   : visualization_msgs/msg/Marker [ros2msg]                       
    (26) /vehicle_3/radar_left/vehicle_state                    28 msgs (28.01 Hz)    : delphi_mrr_msgs/msg/VehicleStateMsg2 [ros2msg]                
    (27) /vehicle_3/radar_right/detection                      207 msgs (207.06 Hz)   : delphi_mrr_msgs/msg/Detection [ros2msg]                       
    (28) /vehicle_3/radar_right/header_information_detections   34 msgs (34.01 Hz)    : delphi_mrr_msgs/msg/MrrHeaderInformationDetections [ros2msg]  
    (29) /vehicle_3/radar_right/marker                         202 msgs (202.06 Hz)   : visualization_msgs/msg/Marker [ros2msg]                       
    (30) /vehicle_3/radar_right/vehicle_state                   28 msgs (28.01 Hz)    : delphi_mrr_msgs/msg/VehicleStateMsg2 [ros2msg]                
    (31) /vehicle_3/local_odometry                              19 msgs (19.01 Hz)    : nav_msgs/msg/Odometry [ros2msg]                               
attachments: 0
metadata: 0
lucasw commented 1 year ago

I was using a plotjuggler built with catkin above (and commingled with other ros1 packages), but had success building with colcon (and overlaying a ros2 iron build), though there's something wrong with sourcing install/setup.bash after the colcon build:

not found: "/home/lucasw/ros/ros2_plotjuggler/install/plotjuggler/share/plotjuggler/local_setup.bash"

I can't start plotjuggler via ros2 run plotjuggler plotjuggler because of that, but I can launch it where the executable was symlinked into install/ inside my colcon workspace:

./install/plotjuggler/lib/plotjuggler/plotjuggler 

And then I can load both ros2 and ros1 mcap bags as desired (this colcon build only has a ros2 subscriber though, so I would have to go back to the catkin built plotjuggler for live ros1 topics).