紧急通知:禁止一切关于政治&VPN翻墙等话题,发现相关帖子会立马删除封号
小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
ros2bag.db3格式的数据,除了ros2转ros1之外,还有别的方法吗
-
转换的话,数据差别有点大
-
@学习人类的第二十三年 我很早之前做过一个开源工具,ros2bag-convert,你搜一下
-
@小鱼 好的,我试试看,谢谢啦
-
@小鱼 ! ,这个怎么办呢
-
foxy下使用自定义msg并录制ros2 bag。python3.8下载安装ros2bag-convert,source环境接口后,使用命令ros2bag-convert xxxx.db3转换,报错如下:
(base) sczone@91b678582320: ~/ros2/pilot_parking/zop$ ros2bag-convert ~/DATADRIVE/robosense_raw_data/0214/zop/ros2bag/2022-02-14-10-26-20_1/2022-02-14-10-26-20_1.db3 ['/sensor_abstraction/EyeQ4VideoObject', '/sensor_abstraction/EyeQ4VideoLane', '/FS/FusContainer', '/NPA/VisionObj', '/NPA/LaneMarkerInfo', '/camera/image'] Traceback (most recent call last): File "/usr/local/bin/ros2bag-convert", line 8, in <module> sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/ros2bag_convert/main.py", line 14, in main data = read_bag.read_from_all_topics(file_url,True) File "/usr/local/lib/python3.8/dist-packages/ros2bag_convert/ros2bag_convert/read_bag.py", line 210, in read_from_all_topics timestamps, messages = read_from_topic(bag_file, topic_names[i], print_out) File "/usr/local/lib/python3.8/dist-packages/ros2bag_convert/ros2bag_convert/read_bag.py", line 183, in read_from_topic dic_data = message_converter.convert_ros_message_to_dictionary(msg) File "/usr/local/lib/python3.8/dist-packages/ros2bag_convert/ros2bag_convert/message_converter.py", line 243, in convert_ros_message_to_dictionary dictionary[field_name] = _convert_from_ros_type(field_type, field_value) File "/usr/local/lib/python3.8/dist-packages/ros2bag_convert/ros2bag_convert/message_converter.py", line 259, in _convert_from_ros_type field_value = convert_ros_message_to_dictionary(field_value) File "/usr/local/lib/python3.8/dist-packages/ros2bag_convert/ros2bag_convert/message_converter.py", line 240, in convert_ros_message_to_dictionary message_fields = message.get_fields_and_field_types() AttributeError: 'list' object has no attribute 'get_fields_and_field_types'
-
@刚刚小飞机 在 ros2bag.db3格式的数据,除了ros2转ros1之外,还有别的方法吗 中说:
File "/usr/local/lib/python3.8/dist-packages/ros2bag_convert/ros2bag_convert/message_converter.py", line 240, in convert_ros_message_to_dictionary
message_fields = message.get_fields_and_field_types()方便把这个message打印出来看看具体内容是个啥吗
-
@小鱼 msg格式如下:
[sensor_abstraction_msgs.msg.VideoObject(header=std_msgs.msg.Header(stamp=builtin_interfaces.msg.Time(sec=0, nanosec=0), frame_id=''), obj_id=0, obj_cam_id=0, obj_fusion_sensor=0, obj_status=0, obj_motion_status=0, obj_type=0, obj_type_conf=0.0, obj_exsit_prob=0.0, obj_length=0.0, obj_width=0.0, obj_height=0.0, obj_heading_angle=-3.140000104904175, obj_heading_angle_std=0.0, obj_yawrate=-2.2339999675750732, obj_lng_absolute_velocity=-30.0, obj_lat_absolute_velocity=-50.0, obj_lng_absolute_velocity_std=0.0, obj_lat_absolute_velocity_std=0.0, obj_lng_relative_velocity=-120.0, obj_lat_relative_velocity=-50.0, obj_lng_relative_velocity_std=0.0, obj_lat_relative_velocity_std=0.0, obj_lng_absolute_acceleration=-10.300000190734863, obj_lat_absolute_acceleration=-10.300000190734863, obj_lng_absolute_acceleration_std=0.0, obj_lat_absolute_acceleration_std=0.0, obj_lng_relative_acceleration=-10.300000190734863, obj_lat_relative_acceleration=0.0, obj_lng_relative_acceleration_std=0.0, obj_lat_relative_acceleration_std=0.0, obj_nearest_side=0, obj_in_lane_position=0, obj_turn_light_status=0, obj_brake_light_status=0, obj_ttc=-8.0, obj_ttc_std=0.0, obj_boundary_x1=0, obj_boundary_y1=0, obj_boundary_x2=0, obj_boundary_y2=0, obj_boundary_x3=0, obj_boundary_y3=0, obj_boundary_x4=0, obj_boundary_y4=0, obj_3_d_boundary_bottom_x=0, obj_3_d_boundary_bottom_y=0, obj_3_d_boundary_top_x=0, obj_3_d_boundary_top_y=0, obj_3_d_boundary_left_x=0, obj_3_d_boundary_left_y=0, obj_3_d_boundary_right_x=0, obj_3_d_boundary_right_y=0, obj_lateral=-100.0, obj_lateral_std=0.0, obj_longitudinal=-200.0, obj_longitudinal_std=0.0, obj_vertical=0.0, obj_vertical_std=0.0, obj_center_angle=-1.5709999799728394, obj_center_angle_std=0.0, obj_total_age=0, obj_init_age=0, obj_measure_age=0, obj_predict_age=0, obj_boundary_min_angle=0.0, obj_boundary_max_angle=0.0), sensor_abstraction_msgs.msg.VideoObject(header=std_msgs.msg.Header(stamp=builtin_interfaces.msg.Time(sec=0, nanosec=0), frame_id=''), obj_id=0, obj_cam_id=0, obj_fusion_sensor=0, obj_status=0, obj_motion_status=0, obj_type=0, obj_type_conf=0.0, obj_exsit_prob=0.0, obj_length=0.0, obj_width=0.0, obj_height=0.0, obj_heading_angle=-3.140000104904175, obj_heading_angle_std=0.0, obj_yawrate=-2.2339999675750732, obj_lng_absolute_velocity=-30.0, obj_lat_absolute_velocity=-50.0, obj_lng_absolute_velocity_std=0.0, obj_lat_absolute_velocity_std=0.0, obj_lng_relative_velocity=-120.0, obj_lat_relative_velocity=-50.0, obj_lng_relative_velocity_std=0.0, obj_lat_relative_velocity_std=0.0, obj_lng_absolute_acceleration=-10.300000190734863, obj_lat_absolute_acceleration=-10.300000190734863, obj_lng_absolute_acceleration_std=0.0, obj_lat_absolute_acceleration_std=0.0, obj_lng_relative_acceleration=-10.300000190734863, obj_lat_relative_acceleration=0.0, obj_lng_relative_acceleration_std=0.0, obj_lat_relative_acceleration_std=0.0, obj_nearest_side=0, obj_in_lane_position=0, obj_turn_light_status=0, obj_brake_light_status=0, obj_ttc=-8.0, obj_ttc_std=0.0, obj_boundary_x1=0, obj_boundary_y1=0, obj_boundary_x2=0, obj_boundary_y2=0, obj_boundary_x3=0, obj_boundary_y3=0, obj_boundary_x4=0, obj_boundary_y4=0, obj_3_d_boundary_bottom_x=0, obj_3_d_boundary_bottom_y=0, obj_3_d_boundary_top_x=0, obj_3_d_boundary_top_y=0, obj_3_d_boundary_left_x=0, obj_3_d_boundary_left_y=0, obj_3_d_boundary_right_x=0, obj_3_d_boundary_right_y=0, obj_lateral=-100.0, obj_lateral_std=0.0, obj_longitudinal=-200.0, obj_longitudinal_std=0.0, obj_vertical=0.0, obj_vertical_std=0.0, obj_center_angle=-1.5709999799728394, obj_center_angle_std=0.0, obj_total_age=0, obj_init_age=0, obj_measure_age=0, obj_predict_age=0, obj_boundary_min_angle=0.0, obj_boundary_max_angle=0.0), sensor_abstraction_msgs.msg.VideoObject(header=std_msgs.msg.Header(stamp=builtin_interfaces.msg.Time(sec=0, nanosec=0), frame_id=''), obj_id=0, obj_cam_id=0, obj_fusion_sensor=0, obj_status=0, obj_motion_status=0, obj_type=0, obj_type_conf=0.0, obj_exsit_prob=0.0, obj_length=0.0, obj_width=0.0, obj_height=0.0, obj_heading_angle=-3.140000104904175, obj_heading_angle_std=0.0, obj_yawrate=-2.2339999675750732, obj_lng_absolute_velocity=-30.0, obj_lat_absolute_velocity=-50.0, obj_lng_absolute_velocity_std=0.0, obj_lat_absolute_velocity_std=0.0, obj_lng_relative_velocity=-120.0, obj_lat_relative_velocity=-50.0, obj_lng_relative_velocity_std=0.0, obj_lat_relative_velocity_std=0.0, obj_lng_absolute_acceleration=-10.300000190734863, obj_lat_absolute_acceleration=-10.300000190734863, obj_lng_absolute_acceleration_std=0.0, obj_lat_absolute_acceleration_std=0.0, obj_lng_relative_acceleration=-10.300000190734863, obj_lat_relative_acceleration=0.0, obj_lng_relative_acceleration_std=0.0, obj_lat_relative_acceleration_std=0.0, obj_nearest_side=0, obj_in_lane_position=0, obj_turn_light_status=0, obj_brake_light_status=0, obj_ttc=-8.0, obj_ttc_std=0.0, obj_boundary_x1=0, obj_boundary_y1=0, obj_boundary_x2=0, obj_boundary_y2=0, obj_boundary_x3=0, obj_boundary_y3=0, obj_boundary_x4=0, obj_boundary_y4=0, obj_3_d_boundary_bottom_x=0, obj_3_d_boundary_bottom_y=0, obj_3_d_boundary_top_x=0, obj_3_d_boundary_top_y=0, obj_3_d_boundary_left_x=0, obj_3_d_boundary_left_y=0, obj_3_d_boundary_right_x=0, obj_3_d_boundary_right_y=0, obj_lateral=-100.0, obj_lateral_std=0.0, obj_longitudinal=-200.0, obj_longitudinal_std=0.0, obj_vertical=0.0, obj_vertical_std=0.0, obj_center_angle=-1.5709999799728394, obj_center_angle_std=0.0, obj_total_age=0, obj_init_age=0, obj_measure_age=0, obj_predict_age=0, obj_boundary_min_angle=0.0, obj_boundary_max_angle=0.0), sensor_abstraction_msgs.msg.VideoObject(header=std_msgs.msg.Header(stamp=builtin_interfaces.msg.Time(sec=0, nanosec=0), frame_id=''), obj_id=0, obj_cam_id=0, obj_fusion_sensor=0, obj_status=0, obj_motion_status=0, obj_type=0, obj_type_conf=0.0, obj_exsit_prob=0.0, obj_length=0.0, obj_width=0.0, obj_height=0.0, obj_heading_angle=-3.140000104904175, obj_heading_angle_std=0.0, obj_yawrate=-2.2339999675750732, obj_lng_absolute_velocity=-30.0, obj_lat_absolute_velocity=-50.0, obj_lng_absolute_velocity_std=0.0, obj_lat_absolute_velocity_std=0.0, obj_lng_relative_velocity=-120.0, obj_lat_relative_velocity=-50.0, obj_lng_relative_velocity_std=0.0, obj_lat_relative_velocity_std=0.0, obj_lng_absolute_acceleration=-10.300000190734863, obj_lat_absolute_acceleration=-10.300000190734863, obj_lng_absolute_acceleration_std=0.0, obj_lat_absolute_acceleration_std=0.0, obj_lng_relative_acceleration=-10.300000190734863, obj_lat_relative_acceleration=0.0, obj_lng_relative_acceleration_std=0.0, obj_lat_relative_acceleration_std=0.0, obj_nearest_side=0, obj_in_lane_position=0, obj_turn_light_status=0, obj_brake_light_status=0, obj_ttc=-8.0, obj_ttc_std=0.0, obj_boundary_x1=0, obj_boundary_y1=0, obj_boundary_x2=0, obj_boundary_y2=0, obj_boundary_x3=0, obj_boundary_y3=0, obj_boundary_x4=0, obj_boundary_y4=0, obj_3_d_boundary_bottom_x=0, obj_3_d_boundary_bottom_y=0, obj_3_d_boundary_top_x=0, obj_3_d_boundary_top_y=0, obj_3_d_boundary_left_x=0, obj_3_d_boundary_left_y=0, obj_3_d_boundary_right_x=0, obj_3_d_boundary_right_y=0, obj_lateral=-100.0, obj_lateral_std=0.0, obj_longitudinal=-200.0, obj_longitudinal_std=0.0, obj_vertical=0.0, obj_vertical_std=0.0, obj_center_angle=-1.5709999799728394, obj_center_angle_std=0.0, obj_total_age=0, obj_init_age=0, obj_measure_age=0, obj_predict_age=0, obj_boundary_min_angle=0.0, obj_boundary_max_angle=0.0), sensor_abstraction_msgs.msg.VideoObject(header=std_msgs.msg.Header(stamp=builtin_interfaces.msg.Time(sec=0, nanosec=0), frame_id=''), obj_id=0, obj_cam_id=0, obj_fusion_sensor=0, obj_status=0, obj_motion_status=0, obj_type=0, obj_type_conf=0.0, obj_exsit_prob=0.0, obj_length=0.0, obj_width=0.0, obj_height=0.0, obj_heading_angle=-3.140000104904175, obj_heading_angle_std=0.0, obj_yawrate=-2.2339999675750732, obj_lng_absolute_velocity=-30.0, obj_lat_absolute_velocity=-50.0, obj_lng_absolute_velocity_std=0.0, obj_lat_absolute_velocity_std=0.0, obj_lng_relative_velocity=-120.0, obj_lat_relative_velocity=-50.0, obj_lng_relative_velocity_std=0.0, obj_lat_relative_velocity_std=0.0, obj_lng_absolute_acceleration=-10.300000190734863, obj_lat_absolute_acceleration=-10.300000190734863, obj_lng_absolute_acceleration_std=0.0, obj_lat_absolute_acceleration_std=0.0, obj_lng_relative_acceleration=-10.300000190734863, obj_lat_relative_acceleration=0.0, obj_lng_relative_acceleration_std=0.0, obj_lat_relative_acceleration_std=0.0, obj_nearest_side=0, obj_in_lane_position=0, obj_turn_light_status=0, obj_brake_light_status=0, obj_ttc=-8.0, obj_ttc_std=0.0, obj_boundary_x1=0, obj_boundary_y1=0, obj_boundary_x2=0, obj_boundary_y2=0, obj_boundary_x3=0, obj_boundary_y3=0, obj_boundary_x4=0, obj_boundary_y4=0, obj_3_d_boundary_bottom_x=0, obj_3_d_boundary_bottom_y=0, obj_3_d_boundary_top_x=0, obj_3_d_boundary_top_y=0, obj_3_d_boundary_left_x=0, obj_3_d_boundary_left_y=0, obj_3_d_boundary_right_x=0, obj_3_d_boundary_right_y=0, obj_lateral=-100.0, obj_lateral_std=0.0, obj_longitudinal=-200.0, obj_longitudinal_std=0.0, obj_vertical=0.0, obj_vertical_std=0.0, obj_center_angle=-1.5709999799728394, obj_center_angle_std=0.0, obj_total_age=0, obj_init_age=0, obj_measure_age=0, obj_predict_age=0, obj_boundary_min_angle=0.0, obj_boundary_max_angle=0.0), sensor_abstraction_msgs.msg.VideoObject(header=std_msgs.msg.Header(stamp=builtin_interfaces.msg.Time(sec=0, nanosec=0), frame_id=''), obj_id=0, obj_cam_id=0, obj_fusion_sensor=0, obj_status=0, obj_motion_status=0, obj_type=0, obj_type_conf=0.0, obj_exsit_prob=0.0, obj_length=0.0, obj_width=0.0, obj_height=0.0, obj_heading_angle=-3.140000104904175, obj_heading_angle_std=0.0, obj_yawrate=-2.2339999675750732, obj_lng_absolute_velocity=-30.0, obj_lat_absolute_velocity=-50.0, obj_lng_absolute_velocity_std=0.0, obj_lat_absolute_velocity_std=0.0, obj_lng_relative_velocity=-120.0, obj_lat_relative_velocity=-50.0, obj_lng_relative_velocity_std=0.0, obj_lat_relative_velocity_std=0.0, obj_lng_absolute_acceleration=-10.300000190734863, obj_lat_absolute_acceleration=-10.300000190734863, obj_lng_absolute_acceleration_std=0.0, obj_lat_absolute_acceleration_std=0.0, obj_lng_relative_acceleration=-10.300000190734863, obj_lat_relative_acceleration=0.0, obj_lng_relative_acceleration_std=0.0, obj_lat_relative_acceleration_std=0.0, obj_nearest_side=0, obj_in_lane_position=0, obj_turn_light_status=0, obj_brake_light_status=0, obj_ttc=-8.0, obj_ttc_std=0.0, obj_boundary_x1=0, obj_boundary_y1=0, obj_boundary_x2=0, obj_boundary_y2=0, obj_boundary_x3=0, obj_boundary_y3=0, obj_boundary_x4=0, obj_boundary_y4=0, obj_3_d_boundary_bottom_x=0, obj_3_d_boundary_bottom_y=0, obj_3_d_boundary_top_x=0, obj_3_d_boundary_top_y=0, obj_3_d_boundary_left_x=0, obj_3_d_boundary_left_y=0, obj_3_d_boundary_right_x=0, obj_3_d_boundary_right_y=0, obj_lateral=-100.0, obj_lateral_std=0.0, obj_longitudinal=-200.0, obj_longitudinal_std=0.0, obj_vertical=0.0, obj_vertical_std=0.0, obj_center_angle=-1.5709999799728394, obj_center_angle_std=0.0, obj_total_age=0, obj_init_age=0, obj_measure_age=0, obj_predict_age=0, obj_boundary_min_angle=0.0, obj_boundary_max_angle=0.0), sensor_abstraction_msgs.msg.VideoObject(header=std_msgs.msg.Header(stamp=builtin_interfaces.msg.Time(sec=0, nanosec=0), frame_id=''), obj_id=0, obj_cam_id=0, obj_fusion_sensor=0, obj_status=0, obj_motion_status=0, obj_type=0, obj_type_conf=0.0, obj_exsit_prob=0.0, obj_length=0.0, obj_width=0.0, obj_height=0.0, obj_heading_angle=-3.140000104904175, obj_heading_angle_std=0.0, obj_yawrate=-2.2339999675750732, obj_lng_absolute_velocity=-30.0, obj_lat_absolute_velocity=-50.0, obj_lng_absolute_velocity_std=0.0, obj_lat_absolute_velocity_std=0.0, obj_lng_relative_velocity=-120.0, obj_lat_relative_velocity=-50.0, obj_lng_relative_velocity_std=0.0, obj_lat_relative_velocity_std=0.0, obj_lng_absolute_acceleration=-10.300000190734863, obj_lat_absolute_acceleration=-10.300000190734863, obj_lng_absolute_acceleration_std=0.0, obj_lat_absolute_acceleration_std=0.0, obj_lng_relative_acceleration=-10.300000190734863, obj_lat_relative_acceleration=0.0, obj_lng_relative_acceleration_std=0.0, obj_lat_relative_acceleration_std=0.0, obj_nearest_side=0, obj_in_lane_position=0, obj_turn_light_status=0, obj_brake_light_status=0, obj_ttc=-8.0, obj_ttc_std=0.0, obj_boundary_x1=0, obj_boundary_y1=0, obj_boundary_x2=0, obj_boundary_y2=0, obj_boundary_x3=0, obj_boundary_y3=0, obj_boundary_x4=0, obj_boundary_y4=0, obj_3_d_boundary_bottom_x=0, obj_3_d_boundary_bottom_y=0, obj_3_d_boundary_top_x=0, obj_3_d_boundary_top_y=0, obj_3_d_boundary_left_x=0, obj_3_d_boundary_left_y=0, obj_3_d_boundary_right_x=0, obj_3_d_boundary_right_y=0, obj_lateral=-100.0, obj_lateral_std=0.0, obj_longitudinal=-200.0, obj_longitudinal_std=0.0, obj_vertical=0.0, obj_vertical_std=0.0, obj_center_angle=-1.5709999799728394, obj_center_angle_std=0.0, obj_total_age=0, obj_init_age=0, obj_measure_age=0, obj_predict_age=0, obj_boundary_min_angle=0.0, obj_boundary_max_angle=0.0), sensor_abstraction_msgs.msg.VideoObject(header=std_msgs.msg.Header(stamp=builtin_interfaces.msg.Time(sec=0, nanosec=0), frame_id=''), obj_id=0, obj_cam_id=0, obj_fusion_sensor=0, obj_status=0, obj_motion_status=0, obj_type=0, obj_type_conf=0.0, obj_exsit_prob=0.0, obj_length=0.0, obj_width=0.0, obj_height=0.0, obj_heading_angle=-3.140000104904175, obj_heading_angle_std=0.0, obj_yawrate=-2.2339999675750732, obj_lng_absolute_velocity=-30.0, obj_lat_absolute_velocity=-50.0, obj_lng_absolute_velocity_std=0.0, obj_lat_absolute_velocity_std=0.0, obj_lng_relative_velocity=-120.0, obj_lat_relative_velocity=-50.0, obj_lng_relative_velocity_std=0.0, obj_lat_relative_velocity_std=0.0, obj_lng_absolute_acceleration=-10.300000190734863, obj_lat_absolute_acceleration=-10.300000190734863, obj_lng_absolute_acceleration_std=0.0, obj_lat_absolute_acceleration_std=0.0, obj_lng_relative_acceleration=-10.300000190734863, obj_lat_relative_acceleration=0.0, obj_lng_relative_acceleration_std=0.0, obj_lat_relative_acceleration_std=0.0, obj_nearest_side=0, obj_in_lane_position=0, obj_turn_light_status=0, obj_brake_light_status=0, obj_ttc=-8.0, obj_ttc_std=0.0, obj_boundary_x1=0, obj_boundary_y1=0, obj_boundary_x2=0, obj_boundary_y2=0, obj_boundary_x3=0, obj_boundary_y3=0, obj_boundary_x4=0, obj_boundary_y4=0, obj_3_d_boundary_bottom_x=0, obj_3_d_boundary_bottom_y=0, obj_3_d_boundary_top_x=0, obj_3_d_boundary_top_y=0, obj_3_d_boundary_left_x=0, obj_3_d_boundary_left_y=0, obj_3_d_boundary_right_x=0, obj_3_d_boundary_right_y=0, obj_lateral=-100.0, obj_lateral_std=0.0, obj_longitudinal=-200.0, obj_longitudinal_std=0.0, obj_vertical=0.0, obj_vertical_std=0.0, obj_center_angle=-1.5709999799728394, obj_center_angle_std=0.0, obj_total_age=0, obj_init_age=0, obj_measure_age=0, obj_predict_age=0, obj_boundary_min_angle=0.0, obj_boundary_max_angle=0.0),...]