src/ball_chaser/src/process_image.cpp
void drive_robot(float lin_x, float ang_z)
{
    // Request a service and pass the velocities to it to drive the robot
    ROS_INFO_STREAM("Sending request to move the robot");

    ball_chaser::DriveToTarget srv;
    srv.request.linear_x = (float)lin_x;
    srv.request.angular_z = (float)ang_z;

    // Call the command_robot service and pass the requested motor commands
    if (!client.call(srv))
        ROS_ERROR("Failed to call service command_robot from ball_chaser package");
}
// This function calls the command_robot service to drive the robot in the specified direction
This function calls the command_robot service to drive the robot in the specified direction
This function calls the command_robot service to drive the robot in the specified direction
void drive_robot(float lin_x, float ang_z)
{
    ROS_INFO_STREAM("Sending request to move the robot");
    ball_chaser::DriveToTarget srv;
    srv.request.linear_x = (float)lin_x;
    srv.request.angular_z = (float)ang_z;
    if (!client.call(srv))
        ROS_ERROR("Failed to call service command_robot from ball_chaser package");
}
void drive_robot ( float lin_x , float ang_z ) { ROS_INFO_STREAM ( " " ) ; ball_chaser :: DriveToTarget srv ; srv . request . linear_x = ( float ) lin_x ; srv . request . angular_z = ( float ) ang_z ; if ( ! client . call ( srv ) ) ROS_ERROR ( " " ) ; }
This function calls the command_robot service to drive the robot in the specified direction
This function calls the command_robot service to drive the robot in the specified direction
// Request a service and pass the velocities to it to drive the robot // Call the command_robot service and pass the requested motor commands