Skip to content

Commit

Permalink
Wrap very long lines
Browse files Browse the repository at this point in the history
  • Loading branch information
gavanderhoorn committed Jun 16, 2023
1 parent 7617da4 commit a9b127a
Showing 1 changed file with 28 additions and 14 deletions.
42 changes: 28 additions & 14 deletions src/ActionServer_FJT.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ rcl_ret_t Ros_ActionServer_FJT_Goal_Received(rclc_action_goal_handle_t* goal_han
if (!bSizeOk)
{
motomanErrorCode = INIT_TRAJ_TOO_BIG;
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string, "Trajectory contains too many points (Not enough memory).");
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string,
"Trajectory contains too many points (Not enough memory).");
}
else if (!bMotionReady)
{
Expand All @@ -272,43 +273,56 @@ rcl_ret_t Ros_ActionServer_FJT_Goal_Received(rclc_action_goal_handle_t* goal_han
switch (motomanErrorCode)
{
case INIT_TRAJ_TOO_SMALL:
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string, "Trajectory must contain at least two points.");
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string,
"Trajectory must contain at least two points.");
break;
case INIT_TRAJ_INVALID_STARTING_POS:
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string, "The first point must match the robot's current position.");
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string,
"The first point must match the robot's current position.");
break;
case INIT_TRAJ_INVALID_VELOCITY:
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string, "The commanded velocity is too high.");
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string,
"The commanded velocity is too high.");
break;
case INIT_TRAJ_ALREADY_IN_MOTION:
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string, "Already running a trajectory.");
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string,
"Already running a trajectory.");
break;
case INIT_TRAJ_INVALID_JOINTNAME:
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string, "Invalid joint name specified. Check motoros2_config.yaml.");
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string,
"Invalid joint name specified. Check motoros2_config.yaml.");
break;
case INIT_TRAJ_INCOMPLETE_JOINTLIST:
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string, "Trajectory must contain data for all joints.");
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string,
"Trajectory must contain data for all joints.");
break;
case INIT_TRAJ_INVALID_TIME:
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string, "Invalid time in trajectory.");
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string,
"Invalid time in trajectory.");
break;
case INIT_TRAJ_BACKWARD_TIME:
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string, "Trajectory message contains waypoints that are not strictly increasing in time.");
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string,
"Trajectory message contains waypoints that are not strictly increasing in time.");
break;
case INIT_TRAJ_WRONG_NUMBER_OF_POSITIONS:
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string, "Trajectory did not contain position data for all axes.");
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string,
"Trajectory did not contain position data for all axes.");
break;
case INIT_TRAJ_WRONG_NUMBER_OF_VELOCITIES:
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string, "Trajectory did not contain velocity data for all axes.");
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string,
"Trajectory did not contain velocity data for all axes.");
break;
case INIT_TRAJ_INVALID_ENDING_VELOCITY:
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string, "The final point in the trajectory must have zero velocity.");
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string,
"The final point in the trajectory must have zero velocity.");
break;
case INIT_TRAJ_INVALID_ENDING_ACCELERATION:
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string, "The final point in the trajectory must have zero acceleration.");
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string,
"The final point in the trajectory must have zero acceleration.");
break;
default:
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string, "Trajectory initialization failed. Generic failure.");
rosidl_runtime_c__String__assign(&fjt_result_response.result.error_string,
"Trajectory initialization failed. Generic failure.");
}
}

Expand Down

0 comments on commit a9b127a

Please sign in to comment.