I need to write a bash script that runs the command ros2 bag record /topic_name for a specified amount of time. Is it possible?
I tried with the command timeout 10 ros2 bag record /topic_name but it doesn't work. I don't know why but basically nothing happens, I cannot see the standard output messages when a record is started. But If I run the command timeout 10 ros2 bag record /topic_name directly from the terminal it works. How is it possible?