ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The rosbag play application itself is implemented in C++: https://github.com/ros/ros_comm/blob/indigo-devel/tools/rosbag/src/play.cpp
The code relevant to publishing messages can be found in the method Player::publish(). The C++ file also contains code for pausing and resuming playback, console output etc., but maybe you can use this code to get a rough idea: https://github.com/ros/ros_comm/blob/indigo-devel/tools/rosbag/src/player.cpp
I'm not sure how Python compares to C++ performance-wise if you are playing large bagfiles (e.g. containing camera images).
2 | No.2 Revision |
The rosbag play application itself is implemented in C++: https://github.com/ros/ros_comm/blob/indigo-devel/tools/rosbag/src/play.cpp
The code relevant to publishing messages can be found in the method Player::publish(). The C++ file also contains code for pausing and resuming playback, console output etc., but maybe you can use this code to get a rough idea: https://github.com/ros/ros_comm/blob/indigo-devel/tools/rosbag/src/player.cpp
I'm not sure how Python compares to C++ performance-wise if you are playing large bagfiles (e.g. containing camera images).
Edit, to answer your question: I believe there is no other way than either
3 | No.3 Revision |
The rosbag play application itself is implemented in C++:
https://github.com/ros/ros_comm/blob/indigo-devel/tools/rosbag/src/play.cppplay.cpp
The code relevant to publishing messages can be found in the method Player::publish(). The C++ file also contains code for pausing and resuming playback, console output etc., but maybe you can use this code to get a rough idea:
https://github.com/ros/ros_comm/blob/indigo-devel/tools/rosbag/src/player.cppplayer.cpp
I'm not sure how Python compares to C++ performance-wise if you are playing large bagfiles (e.g. containing camera images).
Edit, to answer your question: I believe there is no other way than either
4 | No.4 Revision |
The rosbag play application itself is implemented in C++: play.cpp
The code relevant to publishing messages can be found in the method Player::publish(). The C++ file also contains code for pausing and resuming playback, console output etc., but maybe you can use this code to get a rough idea: player.cpp
I'm not sure how I'd expect Python compares to give slightly worse performance compared to C++ performance-wise if you are playing plan to play large bagfiles (e.g. containing camera images).
Edit, to answer your question: I believe there is no other way than either