ROBOTIS-GIT / open_manipulator_p

OpenManipulator-P for controlling in Gazebo and Moveit with ROS
Apache License 2.0
41 stars 21 forks source link

Problems to use MoveIt! with the physical OpenManipulator-PRO #32

Closed KaikeWesleyReis closed 4 years ago

KaikeWesleyReis commented 4 years ago

Hello! I'm having problems to use this arm with MoveIt for sequential position. The task that I'm trying to perform is:

Move to poseA ​and then move to poseB​, sequentially

The Python sample code bellow is an example: Screenshot from 2019-12-16 11-13-12

When I try this code in a Gazebo simuation works correctly. But, when I try with the physical arm it is try to do both positions at the same time (not sequentially). Actually, I'm solving this problem using a rospy.sleep(10) between poses, but I want to know what is happen!

System Information

JaehyunShim commented 4 years ago

@KaikeWesleyReis

Unfortunately, we cannot help you with your own code.

Ryan

KaikeWesleyReis commented 4 years ago

@rjshim I understand, but my point is that the problem is not in the code itself. As I not mentioned, this sample code is based on MoveIt! tutorial and works for others two robots in my lab (UR5 and Jaco from Kinova) correctly and not for OpenManipulator-PRO. My point is that the problem could be in the MoveIt! code from the OpenManipulator-PRO package. I'm just asking if it is possible to do this test, because apparently the nature Action-Server from MoveIt! is not working correctly.

JaehyunShim commented 4 years ago

@KaikeWesleyReis

Because the response from the controller is not 'goal reached' but 'path planned', you are having that issue. I will give you a tip but I can't guarantee it will work. Try below and let me know the result. 1) use function 'go_to_pose' for the first goal pose 2) while ('states' topic message is moving) {print("moving");} 3) use function 'go_to_pose' for the next goal pose.

Ryan

KaikeWesleyReis commented 4 years ago

@rjshim I just came to the lab today. I did not understand your second step, could you explain more?

JaehyunShim commented 4 years ago

@KaikeWesleyReis Echo the 'states' topic while om-pro controller node is running, then you will know.

JaehyunShim commented 4 years ago

As there has been no update, I will close this issue.

Ryan

KaikeWesleyReis commented 4 years ago

Hello @rjshim sorry for the delay, I was on vacation. I tried what you said, but the results was weird. I made: rostopic echo / /open_manipulator_pro/states then I used a sample code to move my robot to some pose. The results in echo was something like this:

---
open_manipulator_moving_state: "\"IS_MOVING\""
open_manipulator_actuator_state: "\"ACTUATOR_ENABLED\""
---
open_manipulator_moving_state: "\"STOPPED\""
open_manipulator_actuator_state: "\"ACTUATOR_ENABLED\""
---
---
open_manipulator_moving_state: "\"IS_MOVING\""
open_manipulator_actuator_state: "\"ACTUATOR_ENABLED\""
---
open_manipulator_moving_state: "\"STOPPED\""
open_manipulator_actuator_state: "\"ACTUATOR_ENABLED\""
---
(...)
---
open_manipulator_moving_state: "\"STOPPED\""
open_manipulator_actuator_state: "\"ACTUATOR_ENABLED\""
---
---
open_manipulator_moving_state: "\"STOPPED\""
open_manipulator_actuator_state: "\"ACTUATOR_ENABLED\""
---

Let's me explain: at movement beginning IS_MOVING and STOPPED alternates, during the movement (...) echo only 'STOPPED', however the arm was in movement.

JaehyunShim commented 4 years ago

@KaikeWesleyReis

This is a sample code of what you want to implement but it is written in ROS2. Function names are all the same so you will get a brief idea of how you should make yours.

Ryan

KaikeWesleyReis commented 4 years ago

@rjshim

I'm glad that you are helping, but my C++ skills are not high level as yours. I'm trying to understand your code, but I was not able to get my solution from there. I will make some assumptions, and you can say if I'm correct or not:

Again, thanks for your help and I think if you clarify those points I can get a better understanding.

KaikeWesleyReis commented 4 years ago

@rjshim any answer?

JaehyunShim commented 4 years ago

@KaikeWesleyReis

I am sorry that I can't debug your code or explain more about ROS. Let us know if there are any problems with our examples.

Ryan

KaikeWesleyReis commented 4 years ago

@rjshim Well, as I said the problem was in OpenManipulator ROBOTIS implemented code. But OK, you can close this.