Closed wentianheshi closed 1 year ago
Hi @wentianheshi,
I won't debug a 700 line file you wrote. Maybe you could guide me to the specific section you are having trouble with.
Based on your terminal output, your waypoint list is invalid. You can use the ValidateWaypointList
function and print the errors in your waypoint list.
Best, Felix
sorry Felix
Previously, your reply to me was based on the SDK, now it is based on ROS questions.
I want say :
case1: I set three waypoint A,B,C,and let robot move A to B to C is successed
case2:
first i control robot move A to B then I set tool transform(0,0.01,0,0,0,0) finally I control robot B to C failed
As can be seen from the logs, the robot received an abort command,
So I suspect the function of tool_transform have some error.
the code of tool_transform
bool example_set_tool_transform(ros::NodeHandle n,
const std::string &robot_name) {
ros::ServiceClient service_client_set_cartesian_tool_transform =
n.serviceClient
service_set_cartesian_tool_transform.request.input.tool_transform.x = 0; service_set_cartesian_tool_transform.request.input.tool_transform.y = 0.01; service_set_cartesian_tool_transform.request.input.tool_transform.z = 0; service_set_cartesian_tool_transform.request.input.tool_transform.theta_x = 0; service_set_cartesian_tool_transform.request.input.tool_transform.theta_y = 0; service_set_cartesian_tool_transform.request.input.tool_transform.theta_z = 0;
if (!service_client_set_cartesian_tool_transform.call( service_set_cartesian_tool_transform)) { std::string error_string = "Failed to call SetToolConfiguration"; ROS_ERROR("%s", error_string.c_str()); return false; } ROS_INFO("set tool success");
// Wait a bit std::this_thread::sleep_for(std::chrono::milliseconds(250));
return true; }
In order to test tool_transform function ,I put this function into the following three cpp files
catkin_make
only example_waypoint_action_client.cpp can run success but kinova driver log have
some error
other two cpp file run abort
Please give me some professional advice thanks wentianheshi
Hi @wentianheshi,
So I have tried moving the arm between 3 poses like you did and setting your tool configuration between the second and third action. Everything worked great for me. No ACTION_ABORT.
Looking at your log, I find it strange that you received an ACTION_ABORT for action 1001. You received an ACTION_END for action 1001 (Pose 1) just before. You then send Pose 12 to the arm, so I would expect a different action identifier. Are you sure about this piece of code?
Also, have you tried using other poses?
Best, Felix
Hi @Felix
First,Thank you for your reply.
I guss the process of setting tool configuration must wait the point moved success,so the process of moving point A to point B must used action client in ros.
The method described in the image is not suitable
can you send me a copy of your testing program, I can compare the differences between the two, maybe this may help me the most.
Yes, I just tested it and changing the tool configuration during an action will lead to an action abort. You have to wait until the action is finished, then change the tool configuration, then start your new action.
You cannot do both at the same time
error:
code:
/*
*/