Read /rosout/msg with seperate Python script
Hello!
I am currently working on a project where I navigate a TurtleBot3 to several positions in a room. The TB3 navigation is triggered by publishing messages to a specific topic (/tb3_hsc/command). These messages are published through a seperate Python script. By seperate I mean that it is not a ROS package, but a .py file that I run from a terminal.
When a position has been reached, a message appears on /rosout/msg that says "Goal reached". What I want to do, is capture the output from /rosout/msg from the moment I send the navigation command (so any messages published to that topic from before the navigation command, should not be included). Then, once the output contains the string "Goal reached", I want the Python script to trigger a new command.
Does anyone have an idea how I can do this?
Thanks in advance!