RethinkRobotics / baxter_simulator

Gazebo Simulation interface for the Baxter Research Robot
http://sdk.rethinkrobotics.com/wiki/Baxter_Simulator
BSD 3-Clause "New" or "Revised" License
84 stars 94 forks source link

ROS: Indigo, OS: Ubuntu 14.04, [ERROR]: Could not compute FK for endpoint #91

Closed mjm522 closed 7 years ago

mjm522 commented 7 years ago

Hi,

As soon as I start the baxter simulator the terminal gets full of errors as the following. I searched internet, but didn't prove useful. Could any one please help. [ERROR] [1477498167.104072521, 7.592000000]: Could not compute FK for endpoint.

Apart from that, I do have the following errors while loading the simulator. The strange problem is that there is no log to be found in the path mention.

[baxter_emulator-8] process has died [pid 12680, exit code -11, cmd /home/mjm/catkin_ws/devel/lib/baxter_sim_hardware/baxter_emulator /home/mjm/catkin_ws/src/baxter_simulator/baxter_sim_hardware/images/researchsdk.png __name:=baxter_emulator __log:=/home/mjm/.ros/log/8aac5b6c-9b96-11e6-beb0-14109fd8a0ab/baxter_emulator-8.log].
log file: /home/mjm/.ros/log/8aac5b6c-9b96-11e6-beb0-14109fd8a0ab/baxter_emulator-8*.log

Doe anyone know how to solve it.

Best,

Mike

mjm522 commented 7 years ago

The error

[baxter_emulator-8] process has died [pid 12680, exit code -11, cmd /home/mjm/catkin_ws/devel/lib/baxter_sim_hardware/baxter_emulator /home/mjm/catkin_ws/src/baxter_simulator/baxter_sim_hardware/images/researchsdk.png __name:=baxter_emulator __log:=/home/mjm/.ros/log/8aac5b6c-9b96-11e6-beb0-14109fd8a0ab/baxter_emulator-8.log].
log file: /home/mjm/.ros/log/8aac5b6c-9b96-11e6-beb0-14109fd8a0ab/baxter_emulator-8*.log

was solved by using this suggestion.. Since I too don't want the camera stuff. i.e. comment out three lines in baxter_emulator.cpp

//image_transport::ImageTransport it(n);
//image_transport::Publisher display_pub = it.advertise(BAXTER_DISPLAY_TOPIC, 1);
//display_pub.publish(cv_ptr->toImageMsg());

And rebuild the package.

Now that is one down. Now I don't have any other faults except Could not compute FK for endpoint.

mjm522 commented 7 years ago

This is part of the error. If anyone has any suggestions, please do suggest.

[ INFO] [1477532410.369610650, 0.797000000]: Loading sub-controller 'r_gripper_l_finger_controller', Namespace: /robot/right_gripper_controller/joints/r_gripper_l_finger_controller
[ERROR] [1477532410.389905503, 0.817000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.389905507, 0.817000000]: Could not compute FK for endpoint.
[ INFO] [1477532410.407936842, 0.835000000]: Loading sub-controller 'r_gripper_r_finger_controller', Namespace: /robot/right_gripper_controller/joints/r_gripper_r_finger_controller
[ERROR] [1477532410.411457085, 0.837000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.411458294, 0.837000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.431004373, 0.857000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.431385868, 0.857000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.450654613, 0.877000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.450783786, 0.877000000]: Could not compute FK for endpoint.
[INFO] [WallTime: 1477532410.451450] [0.877000] Controller Spawner: Loaded controllers: right_gripper_controller
[ INFO] [1477532410.453489637, 0.879000000]: Initializing BaxterGripperController with 2 joints.
[ INFO] [1477532410.453588451, 0.879000000]: Loading sub-controller 'l_gripper_l_finger_controller', Namespace: /robot/left_gripper_controller/joints/l_gripper_l_finger_controller
[urdf_spawner-5] process has finished cleanly
log file: /home/mjm/.ros/log/496783ac-9be6-11e6-82cf-14109fd8a0ab/urdf_spawner-5*.log
[ERROR] [1477532410.475711721, 0.897000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.475711713, 0.897000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.496037343, 0.917000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.496159933, 0.917000000]: Could not compute FK for endpoint.
[ INFO] [1477532410.503458353, 0.925000000]: Loading sub-controller 'l_gripper_r_finger_controller', Namespace: /robot/left_gripper_controller/joints/l_gripper_r_finger_controller
[ERROR] [1477532410.514826051, 0.937000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.514924787, 0.937000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.535098485, 0.957000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.535098044, 0.957000000]: Could not compute FK for endpoint.
[INFO] [WallTime: 1477532410.542848] [0.965000] Controller Spawner: Loaded controllers: left_gripper_controller
[ INFO] [1477532410.544662678, 0.967000000]: Initializing BaxterPositionController with 7 joints.
[ INFO] [1477532410.544764104, 0.967000000]: Loading sub-controller 'right_e0_controller', Namespace: /robot/right_joint_position_controller/joints/right_e0_controller
[ERROR] [1477532410.554626150, 0.977000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.554625503, 0.977000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.574246556, 0.997000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.574246516, 0.997000000]: Could not compute FK for endpoint.
[ INFO] [1477532410.587464422, 1.010000000]: Loading sub-controller 'right_e1_controller', Namespace: /robot/right_joint_position_controller/joints/right_e1_controller
[ERROR] [1477532410.593781646, 1.017000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.593793652, 1.017000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.613607961, 1.037000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.613616796, 1.037000000]: Could not compute FK for endpoint.
[ INFO] [1477532410.620402337, 1.040000000]: Loading sub-controller 'right_s0_controller', Namespace: /robot/right_joint_position_controller/joints/right_s0_controller
[ERROR] [1477532410.636951073, 1.057000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.636985959, 1.057000000]: Could not compute FK for endpoint.
[ INFO] [1477532410.655852882, 1.076000000]: Loading sub-controller 'right_s1_controller', Namespace: /robot/right_joint_position_controller/joints/right_s1_controller
[ERROR] [1477532410.656624770, 1.077000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.656625772, 1.077000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.676133838, 1.097000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.676151075, 1.097000000]: Could not compute FK for endpoint.
[ INFO] [1477532410.688473135, 1.109000000]: Loading sub-controller 'right_w0_controller', Namespace: /robot/right_joint_position_controller/joints/right_w0_controller
[ERROR] [1477532410.695817942, 1.117000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.696010861, 1.117000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.715623376, 1.136000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.715806794, 1.137000000]: Could not compute FK for endpoint.
[ INFO] [1477532410.723325799, 1.145000000]: Loading sub-controller 'right_w1_controller', Namespace: /robot/right_joint_position_controller/joints/right_w1_controller
[ERROR] [1477532410.736680247, 1.157000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.736857975, 1.157000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.755496490, 1.177000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.755496488, 1.177000000]: Could not compute FK for endpoint.
[ INFO] [1477532410.759847760, 1.181000000]: Loading sub-controller 'right_w2_controller', Namespace: /robot/right_joint_position_controller/joints/right_w2_controller
[ERROR] [1477532410.776067316, 1.197000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.776313687, 1.197000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.797267289, 1.218000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.797267294, 1.218000000]: Could not compute FK for endpoint.
[INFO] [WallTime: 1477532410.799931] [1.221000] Loading controller: head_position_controller
[ INFO] [1477532410.803312825, 1.224000000]: Initializing BaxterHeadController with 1 joints.
[ INFO] [1477532410.803401821, 1.224000000]: Loading sub-controller 'head_controller', Namespace: /robot/head_position_controller/joints/head_controller
[ERROR] [1477532410.816024492, 1.237000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.816024496, 1.237000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.836033517, 1.257000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.836034789, 1.257000000]: Could not compute FK for endpoint.
[INFO] [WallTime: 1477532410.841579] [1.262000] Loading controller: left_joint_velocity_controller
[ INFO] [1477532410.845115070, 1.266000000]: Initializing BaxterVelocityController with 7 joints.
[ INFO] [1477532410.845672604, 1.266000000]: Loading sub-controller 'left_e0_controller', Namespace: /robot/left_joint_velocity_controller/joints/left_e0_controller
[ERROR] [1477532410.856465727, 1.277000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.856474716, 1.277000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.876718956, 1.297000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.876925314, 1.297000000]: Could not compute FK for endpoint.
[ INFO] [1477532410.878583927, 1.299000000]: Loading sub-controller 'left_e1_controller', Namespace: /robot/left_joint_velocity_controller/joints/left_e1_controller
[ERROR] [1477532410.896444250, 1.317000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.896450689, 1.317000000]: Could not compute FK for endpoint.
[ INFO] [1477532410.906918801, 1.327000000]: Loading sub-controller 'left_s0_controller', Namespace: /robot/left_joint_velocity_controller/joints/left_s0_controller
[ERROR] [1477532410.916644988, 1.337000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.916645508, 1.337000000]: Could not compute FK for endpoint.
[ INFO] [1477532410.932435651, 1.353000000]: Loading sub-controller 'left_s1_controller', Namespace: /robot/left_joint_velocity_controller/joints/left_s1_controller
[ERROR] [1477532410.936296195, 1.357000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.936310504, 1.357000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.956444789, 1.377000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.956445684, 1.377000000]: Could not compute FK for endpoint.
[ INFO] [1477532410.962777245, 1.383000000]: Loading sub-controller 'left_w0_controller', Namespace: /robot/left_joint_velocity_controller/joints/left_w0_controller
[ INFO] [1477532410.968098909]: GazeboRosVideo (gzclient, ns = /) has started!
[ERROR] [1477532410.976377548, 1.397000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.976378109, 1.397000000]: Could not compute FK for endpoint.
[ INFO] [1477532410.993550762, 1.414000000]: Loading sub-controller 'left_w1_controller', Namespace: /robot/left_joint_velocity_controller/joints/left_w1_controller
[ERROR] [1477532410.996635254, 1.417000000]: Could not compute FK for endpoint.
[ERROR] [1477532410.996635013, 1.417000000]: Could not compute FK for endpoint.
[ERROR] [1477532411.017317533, 1.437000000]: Could not compute FK for endpoint.
[ERROR] [1477532411.017327646, 1.437000000]: Could not compute FK for endpoint.
[ INFO] [1477532411.022257700, 1.442000000]: Loading sub-controller 'left_w2_controller', Namespace: /robot/left_joint_velocity_controller/joints/left_w2_controller
mjm522 commented 7 years ago

@IanTheEngineer There is an issue with the code that is causing the above fault. I guess, I have found it. It is inside arm_kinematics.cpp of baxter_sim_kinematics package. The unsigned int variable num_joints is initialized to zero when it reaches the functionbool arm_kinematics::Kinematics::getPositionFK() and hence it throws error Could not compute FK for endpoint. since num_joints = 0 and does not get into any joints. While the joint_configuration.position array does have all the joint names inside it. So if we manually change the value of num_joints to 7 inside bool Kinematics::init(std::string tip, int &no_jts), then the error shown in the previous message goes off.

Now after this, I am able to enable the robot and run the velocity_wobbler.py example. It works fine. But as soon as I enable the robot following error cumulates in the terminal.

[ERROR] [1477600939.892096989, 115.234000000]: KT: Failed to compute gravity torques from KDL return code for left and right arms -1 -1
[ERROR] [1477600940.917356225, 116.234000000]: KT: Failed to compute gravity torques from KDL return code for left and right arms -1 -1

Any suggestions why? Does it have to do anything num_joints? Should I put that value somewhere else as well?

mjm522 commented 7 years ago

Sometimes my simulator works with the above fix, but other times, I get this faults either in the beginnning or while enabling the robot.

[baxter_emulator-8] process has died [pid 2696, exit code -6, cmd /home/mjm/catkin_workspaces/test_ws/devel/lib/baxter_sim_hardware/baxter_emulator /home/mjm/catkin_workspaces/test_ws/src/baxter_simulator/baxter_sim_hardware/images/researchsdk.png __name:=baxter_emulator __log:=/home/mjm/.ros/log/5e5b28b0-9c8e-11e6-a147-14109fd8a0ab/baxter_emulator-8.log].
log file: /home/mjm/.ros/log/5e5b28b0-9c8e-11e6-a147-14109fd8a0ab/baxter_emulator-8*.log

The log gets never written, hence I don't know what went wrong.

mjm522 commented 7 years ago

Does the URDF file has any problem?

It doesn't get into the following function.

  while (link && link->name != root_name) 
    {

      if (!(link->parent_joint)) 
      {
        break;
      }

of the bool Kinematics::readJoints(urdf::Model &robot_model) function. Hence num_joints never get updated. I guess all other problems are related regarding some naming conventions. But the Gazebo loads with baxter, though above errors exist.

mjm522 commented 7 years ago

I reinstalled everything. It works now. I guess it was some conflicting files with my urdf parser that created the issues.!!!