Closed wentianheshi closed 1 year ago
Hi @wentianheshi,
Can you give more info on this issue? Maybe copy your full terminal output. From your screenshot, I do not see where"set tool success" is printed out.
I am not sure I fully understand the whole sequence you are doing. You are moving the arm, when it stops you change the tool transform, and you send another trajectory afterwards. Is that correct? When does the error happen in all of this?
Best, Felix
Hello @felixmaisonneuve,and everyone. I use the functions below to set the TCP of arm, Although it show succeed, the terminal(kinonva driver) still have a error. As shown in Figure below. Could you please give me some suggestions on this? kinova gen3 7dof![image](https://user-images.githubusercontent.com/38513139/227150125-62f59188-d53b-4d92-ac42-e7f19917151e.png)
the function of set tcp in ros bool example_set_tool_transform(ros::NodeHandle n,const std::string &robot_name,std::vector tool)
{
ros::ServiceClient service_client_set_cartesian_tool_transform =
n.serviceClient(
"/" + robot_name + "/control_config/set_tool_configuration");
kortex_driver::SetToolConfiguration service_set_cartesian_tool_transform;
service_set_cartesian_tool_transform.request.input.tool_transform.x = tool[0]; service_set_cartesian_tool_transform.request.input.tool_transform.y = tool[1]; service_set_cartesian_tool_transform.request.input.tool_transform.z = tool[2]; service_set_cartesian_tool_transform.request.input.tool_transform.theta_x = tool[3]; service_set_cartesian_tool_transform.request.input.tool_transform.theta_y = tool[4]; service_set_cartesian_tool_transform.request.input.tool_transform.theta_z = tool[5];
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; }