I'll list the relevant Python code I am using below.
The first problem was that I got the error:
MotionManager instance has no attribute
'listener'
So I changed line 261 in grasp_utilities.py from:
pose_transformed =
self.listener.transformPose(self._fixed_frame, pose_stamped)
to
pose_transformed =
self._listener.transformPose(self._fixed_frame, pose_stamped)
This fixed the above error. Now my test script runs fine up to
the point where it tries to run moveToPose() to get the gripper
back to the saved pose. At that point I get the error:
[ INFO] [1368808483.632983480]: Ready to take MoveGroup
commands for group Arm.
Traceback (most recent call last):
File "./maxwell.py", line 51, in <module>
TestMoveIt()
File "./maxwell.py", line 48, in __init__
move.moveToPose(target_pose)
File
"/home/patrick/catkin_ws/src/chessbox/chess_player/src/chess_player/grasp_utilities.py",
line 261, in moveToPose
pose_transformed =
self._listener.transformPose(self._fixed_frame, pose_stamped)
File
"/opt/ros/groovy/lib/python2.7/dist-packages/tf/listener.py",
line 187, in transformPose
mat44 = self.asMatrix(target_frame, ps.header)
File
"/opt/ros/groovy/lib/python2.7/dist-packages/tf/listener.py",
line 74, in asMatrix
translation,rotation =
self.lookupTransform(target_frame, hdr.frame_id, hdr.stamp)
tf.ExtrapolationException: Lookup would require
extrapolation into the future. Requested time
1368808485.754877090 but the latest data is at time
1368808483.771286011, when looking up transform from frame
[/odom] to frame [/base_link]
Here now is my test script:
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To post to this group, send email to hbrob...@googlegroups.com.
Visit this group at http://groups.google.com/group/hbrobotics?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+unsubscribe@googlegroups.com.
So, I will just point out, that the "place" action appears to be broken in the latest moveIt, which is why I'm using the older version (it is broken on PR2 tutorial as well, something internal is not happy)
-Fergs
On Fri, May 17, 2013 at 3:52 PM, Patrick Goebel <pat...@pirobot.org> wrote:
Thanks Fergs and Alan D.,
Adding a delay did the trick. And no I'm not using your .rosinstall file which might explain why my test doesn't move the gripper to exactly the right location. But it's good enough for now since I'm just trying to understand the MoveIt! basics at the moment.
Also, I have an open issue submitted with Ioan as well since the MoveIt! set_target_pose() is not currently working...
--patrick
On 05/17/2013 11:02 AM, Michael Ferguson wrote:
Ah yes, that is a typo -- and that code has never run on my machine, because in the ChessExecutive, we pass in the global TransformListener so that there is only one instance shared among many classes (cuts down on memory overhead, since each Listener will have a cache).
You'll also want to add a small delay (say 2 seconds) after the creation of the listener (so that the cache gets filled in). You can do something more sophisticated with try/except, but right now the code doesn't really do that yet.
Finally, are you using my .rosinstall file? You'll notice I'm building moveit_core and moveit_ros from source, and using a revision about 1-2 releases old. There's currently something wonky going on in the latest release, which Ioan is aware of, but due to ICRA/ROScon, it hasn't been debugged and fixed.
-Fergs
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To post to this group, send email to hbrob...@googlegroups.com.
Visit this group at http://groups.google.com/group/hbrobotics?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.