arm_kinematics_constraint_aware dies after call to get_fk
I am using autogenerated custom lwa_arm_navigation
stack acquired from Planning Description Configuration Wizard on Fuerte. Arm is the 7 DOF Schunk LWA provided within care-o-bot stack.
When calling /lwa_arm_kinematics/get_fk
, a node adopted from this tutorial returns error:
Forward kinematics service call failedand
arm_kinematics_constraint_aware
node dies with the following error: [lwa_arm_kinematics-5] process has died [pid 12417, exit code -11, cmd /home/0xff/ros/arm_navigation/arm_kinematics_constraint_aware/bin/arm_kinematics_constraint_aware __name:=lwa_arm_kinematics __log:=/home/0xff/.ros/log/0f7bc99c-024c-11e2-8d0d-c860005ffb62/lwa_arm_kinematics-5.log]. log file: /home/0xff/.ros/log/0f7bc99c-024c-11e2-8d0d-c860005ffb62/lwa_arm_kinematics-5*.log
Although this problem looks exactly same as on Electric provided solution does not work anymore. So is it a problem of different nature in my case?
Request to get_fk
is filled as:
fk_request.header.frame_id = "base_link";
fk_request.fk_link_names.push_back("arm_7_link");
for(unsigned int i=0; i < response.kinematic_solver_info.joint_names.size(); i++)
{
fk_request.robot_state.joint_state.position[i] = 0.0;
}
The kinematic chain is:
$ rosrun urdf_parser check_urdf lwa.urdf
robot name is: lwa
---------- Successfully Parsed XML ---------------
root Link: base_link has 1 child(ren)
child(1): arm_0_link
child(1): arm_1_link
child(1): arm_2_link
child(1): arm_3_link
child(1): arm_4_link
child(1): arm_5_link
child(1): arm_6_link
child(1): arm_7_link
However /lwa_arm_kinematics/get_fk_solver_info
saying there is only one link -- arm_7_link
Thanks in advance for any help
EDIT#1:
Here is the output from gdb
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe0fce700 (LWP 27607)]
0x00007ffff7ddd39a in std_msgs::Header_<std::allocator<void> >::operator=(std_msgs::Header_<std::allocator<void> > const&) ()
from /opt/ros/fuerte/lib/libsensor_msgs.so
Missing separate debuginfos, use: debuginfo-install
<--- a lot of package names here --->
(gdb) continue
Continuing.
[Thread 0x7fffcb7fe700 (LWP 27647) exited]
[Thread 0x7fffcbfff700 (LWP 27639) exited]
[Thread 0x7fffe0fce700 (LWP 27607) exited]
[Thread 0x7fffe17cf700 (LWP 27606) exited]
[Thread 0x7fffe23db700 (LWP 27596) exited]
[Thread 0x7fffe2bdc700 (LWP 27595) exited]
[Thread 0x7fffe33dd700 (LWP 27594) exited]
Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
EDIT#2:
I am not good at debugging with plain gdb
so I did it with the help of Eclipse. So the cause of SIGSEGV is here:
bool
ArmKinematicsConstraintAware::getPositionFK(
kinematics_msgs::GetPositionFK::Request &request,
kinematics_msgs::GetPositionFK::Response &response){
// --- cut --- //
if(!collision_models_interface_->convertPoseGivenWorldTransform(
*state, request.header.frame_id, world_header,
poses[i], response.pose_stamped[i])) {
response.error_code.val = response.error_code.FRAME_TRANSFORM_FAILURE;
return true;
}
// --- cut --- //
}
Here poses
and response.pose_stamped
has different size, while the counter runs based on poses.size()
which is 1, the response.pose_stamped
is empty.
Now, the question is it a bug or I should initialize response
fields by myself?
Could you investigate a bit more, when exactly (at which line) the node dies? You can use GDB via roslaunch to do a backtrace.
Are the joint names filled in the robot_state in the request? (nevertheless, the node shouldn't abort)
@dornhege, yes, same as in tutorial:
fk_request.robot_state.joint_state.name = response.kinematic_solver_info.joint_names;