How to move Nao with moveit through python nodes

236 views
Skip to first unread message

L C

unread,
Jun 4, 2015, 5:51:29 PM6/4/15
to ros-sig-...@googlegroups.com
Hi everyone,

I'm currently working with a real Nao robot and I've been messing with Moveit for a couple of weeks to plan movements for both arms. After following this tutorial (https://github.com/ros-naoqi/nao_moveit_config) I was able to move them with Rviz, but I would like to do that with my (python) nodes instead.

For that purpose I found two ROS services (/compute_cartesian_path and /execute_kinematic_path), but I don't know how to use them properly. To be more precise, I only managed to move one arm like this:

- From Nao "StandZero" posture I was able to plan and move his left arm ("arm_hand_left" group) with two waypoints: (1) The current pose of the end effector and (2) a end effector pose obtained though a moveit_commander object after moving the arm with Rviz (to ensure that the target was reachable). I also used the values 0.1 and 0.0 for eef_step and jump_threshold respectively (it didn't work with other values of eef_step).

These are the poses of the two waypoints:
First Pose >>>
  position:
  x: 0.159910126981
  y: 0.115082506439
  z: 0.0874946336454
  orientation:
  x: 0.00870820429358
  y: 0.0387639416505
  z: -0.0118509270157
  w: 0.999140170114
 
Second Pose >>>
  position:
  x: 0.121684274707
  y: 0.181389644236
  z: 0.100010047472
  orientation:
  x: -1.39799478812e-05
  y: -4.84357742668e-05
  z: 0.00133293778471
  w: 0.999999110367
 
And the result:
[ INFO] [1433323640.647992549]: Received request to compute Cartesian path
[ INFO] [1433323640.648322967]: Attempting to follow 2 waypoints for link 'l_wrist' using a step of 0.100000 m and jump threshold 0.000000 (in global reference frame)
[ INFO] [1433323640.648750631]: Computed Cartesian path with 3 points (followed 100.000000% of requested trajectory)

So now my questions are:
- Is it possible to move the arms by only providing the position (and no orientation) of the target (similar to Naoqi's cartesian control)? I tried doing that with the previous example values and it didn't work (same first waypoint pose and only the position from the second waypoint).

- Is there any way to obtain the eef_step value from the waypoints positions? (given that I only was able to move the arm with the value of 0.1).

- Is it possible to use both Naoqi and Moveit at the same time (to move the arms with Moveit and adopt postures with Naoqi)? I've observed some type of incompatibility between both (example: if I launch the Moveit nodes and then I launch Choregraphe (or my python nodes) and try to adopt a posture, the robot doesn't move, or it does, but at the end it goes back to the previous posture).

Any help would be welcome.

Thanks,
Luis

PS: I use ROS indigo, and the latest sdk and Nao ROS packages.
Reply all
Reply to author
Forward
0 new messages