How can I remove active topic?
Hi, I wanted to use a python script to record a bag instead of using the command line in terminal. My script is based on how record rosbag with python. However, the recorded topic stay active in the topic list even after I kill the process with Ctrl+C.
The code snippet is as follows:
import subprocess, shlex, psutil
command = "ros2 bag record -o subset /sensor/position"
command = shlex.split(command)
rosbag_proc = subprocess.Popen(command)
How can I fix this?
Any help is appreciated
Follow the answer..