Open dehann opened 1 year ago
HI @Affie , could you link perhaps the Python script you've been using please? The one that can read bag files but does not need the rest of ROS...
using PyCall
py"""
# needs rosbags installed in python `pip install rosbags`
from rosbags.rosbag1 import Reader
from rosbags.serde import deserialize_ros1, deserialize_cdr, ros1_to_cdr
"""
#setup the rosbag reader
reader = py"filename.bag')"
# open rosbag
reader.open()
# list of topics
topics = reader.topics
# reading like this
for (connection, timestamp, rawdata) in reader.messages()
msg = py"deserialize_ros1($(Vector{UInt8}(rawdata)),$(connection[3]))"
@show msg
#do something with msg
end
update to docs page to clarify when and when not roscore is necessary. https://juliarobotics.org/Caesar.jl/latest/examples/using_ros/
RosbagReader and RosbagWriter do not need roscore to be running per se. Live traffic pub sub does need roscore running.
Extra info, likely also has something to do with
initnode()
call.