ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Solution found but controller failed during execution

asked 2022-08-04 05:55:12 -0600

omeranar1 gravatar image

updated 2022-09-05 01:25:32 -0600

Hello
This problem has been asked several times before, but I could not find a solution.

I am sending Execute (-60) and Execute(+60) orders to robotic arm.
The robot arm works for 3 hours and there is no problem. After 3 hours, I encounter the error in the picture.

By the way, I know my orders are outside the limits of the joint. Even if the orders are within the limits of the joint, I am encountering this error.

image description

Invalid Trajectory: start point deviates from current robot state more than 0.01 joint 'j1': expected: 0.523559, current: -0.52352

Move2Angles3Plan();

MoveItErrorCode KRVizMoveGroupSystem::Move2Angles3Plan( string from, Plan& plan, std::map<std::string, double> goals, double velScale, double accScale )
{
    std::stringstream ss;
    ss << "tool:" << from << "::";
    for ( int data = 0; data < JOINT_COUNT; data++ )
        ss << JOINT_NAMES[data] << ":" << goals[JOINT_NAMES[data]] * rad2deg << "|";
    LOG_INFO( ss.str() );

    kPyGlobals.move_group_end->setMaxVelocityScalingFactor( velScale );
    kPyGlobals.move_group_end->setMaxAccelerationScalingFactor( accScale );
    kPyGlobals.move_group_end->setJointValueTarget( goals );
    WaitForReady();
    kPyGlobals.move_group_end->plan( plan );

    MoveItErrorCode status = Execute( plan );
    //
    if ( !waitForDeadBand( plan ) )
        return MoveItErrorCode::FAILURE;
    return status;
}

Controller;

# RVIZ -> GAZEBO/HARDWARE : JOINT EMIRLERI
rviz_to_controller_cmd:
    #publish_rate: 500
    type: position_controllers/JointTrajectoryController
    joints:
        - j1
        - j2
        - j3
        - j4
        - j5
        - j6
    stop_trajectory_duration: 0.25
    state_publish_rate:  500
    action_monitor_rate: 10

#SPACE MOUSE > GAZEBO/CONTROLLER : JOINT EMIRLERI
sm_to_controller_cmd:
    #publish_rate: 500
    type: position_controllers/JointGroupPositionController
    joints:
        - j1
        - j2
        - j3
        - j4
        - j5
        - j6

    #pid: { p: 100, i: 0, d: 0 }

# GAZEBO/CONTROLLER -> RVIZ : JOINT ACILARI
controller_joint_states:
    type: joint_state_controller/JointStateController
    publish_rate: 500

controller_list:
  - name: rviz_to_controller_cmd
    action_ns: "follow_joint_trajectory"
    type: FollowJointTrajectory
    default: true
    joints:
      - j1
      - j2
      - j3
      - j4
      - j5
      - j6
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-09-06 08:22:58 -0600

twdragon gravatar image

It seemed that your angular measurement unit changed the direction or quadrant. At first, you need to check if there is an undefined behaviour somewhere if the ordered points are outside of the limits because of some internal parameters that could be left uninitialized. Try also to investigate if there is an overflow in some sequential accumulators in your program.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2022-08-04 05:55:12 -0600

Seen: 505 times

Last updated: Sep 06 '22