ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I have somewhat solved my problem with use of this hack:
ros2ws_dir = "/".join(get_package_share_directory('bag_recorder_pkg').split('/')[:-4])
# it gives e.g. /home/user/ros2_ws/
Then in the code of I give in __init__
of SimpleBagRecorder uri
equal to timestamp + ros2ws_dir + "/rosbags/"
. It saves the bag in my ros2_ws
in the folder rosbags/
.