Skip to content

Commit 74ab7f9

Browse files
committed
Enhance robot program state logging with clearer running messages
Updated console output to indicate when the robot control program is running and when it is connected but not yet running.
1 parent 611f409 commit 74ab7f9

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/example_robot_wrapper.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,16 +232,18 @@ bool ExampleRobotWrapper::initializeRobotWithPrimaryClient()
232232

233233
void ExampleRobotWrapper::handleRobotProgramState(bool program_running)
234234
{
235-
// Print the text in green so we see it better
236-
std::cout << "\033[1;32mProgram running: " << std::boolalpha << program_running << "\033[0m\n" << std::endl;
237235
if (program_running)
238236
{
237+
// Print the text in green so we see it better
238+
std::cout << "\033[1;32mRobot control program is running and connected to the driver\033[0m\n" << std::endl;
239239
std::lock_guard<std::mutex> lk(program_running_mutex_);
240240
program_running_ = program_running;
241241
program_running_cv_.notify_one();
242242
}
243243
else
244244
{
245+
// Print the text in yellow to indicate the robot is connected but the control program is not (yet) running
246+
std::cout << "\033[1;33mRobot connected - Control program not running yet\033[0m\n" << std::endl;
245247
std::lock_guard<std::mutex> lk(program_not_running_mutex_);
246248
program_running_ = program_running;
247249
program_not_running_cv_.notify_one();

0 commit comments

Comments
 (0)