I'm pretty new to ROS and Carla, but I'm doing a project on imitation learning that needs to extract data from ROS. I'm using this library rosbags to retrieve data.
With other datas like image and speed, I could easily extract and deserialize with the following code.
from rosbags.rosbag2 import Reader
from rosbags.serde import deserialize_cdr
def print_data(topic):
with Reader('carla_data') as reader:
for i, (connection, timestamp, rawdata) in enumerate(reader.messages()):
if connection.topic == topic:
msg = deserialize_cdr(rawdata, connection.msgtype)
print(i, msg)
break
I have data from topics from ROS for the following:
Everything works fine except for the topic /carla/ego_vehicle/vehicle_control_cmd_manual which gives an error like this
Please tell me what I'm doing wrong.