Re: [Tutor] How to go about a simple object grabbing in python (given coordinates of arms and objects)

Liste des GroupesRevenir à cl python 
Sujet : Re: [Tutor] How to go about a simple object grabbing in python (given coordinates of arms and objects)
De : mk1853387 (at) *nospam* gmail.com (marc nicole)
Groupes : comp.lang.python
Date : 22. Jun 2024, 22:54:21
Autres entêtes
Message-ID : <mailman.160.1719093296.2909.python-list@python.org>
References : 1 2 3
My code is just an attempt at the task, it is not exact as what relates to
the coordinates (e.g., doesn't account for the size of the object. I would
like to have a idea on the general approach to such problems (even a pseudo
code would do)

"Get the hands rapidly enough in the vicinity and then do some fine
coordinated motions to capture the object and then presumably move it."
seems to be a good approach indeed,
The grabbing with both hands code should be more precise.

Thanks for the help anyways!

Le sam. 22 juin 2024 à 23:04, ThreeBlindQuarks <threesomequarks@proton..me>
a écrit :

Marc,
>
Could you specify what is wrong with what you are doing? you show us code
that uses an environment you point to that is largely outside of basic
Python.
>
There is no one way to get from point A to point B and various constraints
you have not mentioned can apply. How many joints does the assemblage have
and what are the limits and costs associated with each. Cam there be
barriers along a route, including to the side where they may brush part of
your equipment. Are other things moving (independently even) that may end
up blocking.
>
You seem to need both "hands" and presumably at the same time. So
solutions can take that into account. You need to define what is meant by
contacting the object to move and you don't want to approach it and hit
with some speed.
>
So, the problem may be in parts. Get the hands rapidly enough in the
vicinity and then do some fine coordinated motions to capture the object
and then presumably move it.
>
If you could point to what code is not doing what is expected, someone who
knows the details or is willing to learn, might help, If you want an
overall algorithm, there may be some people could share but they may not
easily translate into the package of sorts you are using.
>
But the web site you point us to may well already contain examples of
doing some aspects that you might learn from.
>
For me, this is too detailed to focus on as I struggle to figure out how
to move my hands to different parts of my keyboard while looking ...
>
And that may be one variant of an algorithm where instead of trying to
move all the way, you move art-way and LOOK where you are, then repeat.
>
>
Sent with Proton Mail secure email.
>
On Saturday, June 22nd, 2024 at 8:41 AM, marc nicole <mk1853387@gmail.com>
wrote:
>
Hello to all of this magnificent community!
>
I have this problem I had already spent a few days on and still can't
figure out a proper solution.
>
So, given the x,y,z coordinates of a target object and the offset x,y,z
of
arms of a robot, what is a good algorithm to perform to grab the object
between the hands (either from both sides or from below all using both
hands).
>
Specifically, my problem is applied to a NAO robot environment where I
retrieve a target object coordinates using the following code:
>
tracker_service= session.service("ALTracker")
xyz_pos = tracker_service.getTargetPosition(motion.FRAME_TORSO)
>
>
src:
>
http://doc.aldebaran.com/2-8/naoqi/motion/control-cartesian.html#motion-cartesian-effectors
>
>
Then I get to move the right arm towards nearby the object using the
following code:
>
effector = "RArm"
>
frame = motion.FRAME_TORSO
effector_offset > > almath.Transform(self.motion.getTransform(effector, frame, False))
effector_init_3d_position = almath.position3DFromTransform(
effector_offset)
>
target_3d_position = almath.Position3D(target_position)
move_3d = target_3d_position - effector_init_3d_position
moveTransform = almath.Transform.fromPosition(move_3d.x,
move_3d.y, move_3d.z)
target_transformer_list = list(moveTransform.toVector())
times = [2.0]
axis_mask_list = motion.AXIS_MASK_VEL
self.motion.transformInterpolations(effector, frame,
target_transformer_list, axis_mask_list, times).
>
src:
http://doc.aldebaran.com/1-14/dev/python/examples/almath/index.html?highlight=offset
This question is specific to NAO environment but in general how to go
about this task? what is a most common algorithm used in this case? Do
I have to also get the side of the object in order to know where
exactly the arms should be placed?
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
>

Date Sujet#  Auteur
22 Jun 24 o Re: [Tutor] How to go about a simple object grabbing in python (given coordinates of arms and objects)1marc nicole

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal