You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello , I have created a function to send the arm to desired position, the issue is when I am trying to move it it's moving to a point but after that it get stuck and not take the second command. After the print like it get stuck std::cout << "after move_srv_ " << std::endl;
I am not sure what is wrong as It was working on earlier version of github that I used few month before but with the latest version , it's giving this issue.
bool RoboticArmController::moveLine(std::vector<float> position, float velocity, float acceleration, float mvtime, float mvradii)
{
// Log the parameters to ensure they're correct
ROS_INFO("Attempting to moveLine to position: [%f, %f, %f, %f, %f, %f], velocity: %f, acceleration: %f, mvtime: %f, mvradii: %f",
position[0], position[1], position[2], position[3], position[4], position[5],
velocity, acceleration, mvtime, mvradii);
// Wait for the service to become available
if (!move_line_client_.waitForExistence(ros::Duration(10.0)))
{
ROS_ERROR("Service '/xarm/move_line' does not exist or is not available.");
return false;
}
std::cout << "after waitForExistence " << std::endl;
// Call the service
move_srv_.request.pose = position;
move_srv_.request.mvvelo = velocity;
move_srv_.request.mvacc = acceleration;
move_srv_.request.mvtime = mvtime;
move_srv_.request.mvradii = mvradii;
std::cout << "after move_srv_ " << std::endl;
if (move_line_client_.call(move_srv_))
{
std::cout << "move_line_client_ in if " << std::endl;
ROS_INFO("Service '/xarm/move_line' called successfully.");
return true;
}
else
{
std::cout << "move_line_client_ in else " << std::endl;
ROS_ERROR("Failed to call service '/xarm/move_line'.");
return false;
}
}
@Akumar201 Since we do not have your original code. I have tested with this code with similar structure, and it worked fine. Could you confirm you can execute this program with no problem? It can be run by:
$ rosrun xarm_api move_test
The prior launch command is: roslaunch xarm_bringup xarm<your_robot_dof>_server.launch robot_ip:=<your_robot_ip>.
Hello , I have created a function to send the arm to desired position, the issue is when I am trying to move it it's moving to a point but after that it get stuck and not take the second command. After the print like it get stuck
std::cout << "after move_srv_ " << std::endl;
I am not sure what is wrong as It was working on earlier version of github that I used few month before but with the latest version , it's giving this issue.
points looks something like
The text was updated successfully, but these errors were encountered: