-
Notifications
You must be signed in to change notification settings - Fork 174
Open
Description
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;
}
}
points looks something like
"x": 0.105,
"y": -0.705,
"z": 0.150,
"qw": 0.999778,
"qx": 0.011202,
"qy": 0.000213,
"qz": 0.017821
[ERROR] [1727555169.026892018]: Failed to call service '/xarm/move_line'.
[ERROR] [1727555169.027024140]: Failed to execute moveLine.
[main_node-1] process has died [pid 48165, exit code 1, cmd bash -c sleep 4.0; $0 $@ /home/orangepi/targetarm/ralar_ws/devel/lib/tularm/main __name:=main_node __log:=/home/orangepi/.ros/log/7ba971ce-7dd6-11ef-85f0-0000a449ddbb/main_node-1.log].
log file: /home/orangepi/.ros/log/7ba971ce-7dd6-11ef-85f0-0000a449ddbb/main_node-1*.log
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels