Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

Don't let your mind wander -- it's too little to be let out alone.


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

SubjectAuthor
o Re: [Tutor] How to go about a simple object grabbing in python (given coordinatemarc nicole

1
Subject: Re: [Tutor] How to go about a simple object grabbing in python (given coordinates of arms and objects)
From: marc nicole
Newsgroups: comp.lang.python
Date: Sat, 22 Jun 2024 21:54 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: mk1853387@gmail.com (marc nicole)
Newsgroups: comp.lang.python
Subject: Re: [Tutor] How to go about a simple object grabbing in python (given
coordinates of arms and objects)
Date: Sat, 22 Jun 2024 23:54:21 +0200
Lines: 120
Message-ID: <mailman.160.1719093296.2909.python-list@python.org>
References: <CAGJtH9SdZvsrgLHnC+NSmj9P9ykG8qXj2JXk27ai=HAYaam-GQ@mail.gmail.com>
<ONmXENWwuhv8ecUmN9VPG_lXN-V0ounT-EYQ-52iWvlRdv_6l6OPN_1hB4vPzqqlg_ioyEJT5LuH512V8iATfI2kzKuXVbygx8j9tiSLgzM=@proton.me>
<CAGJtH9SY=VEAP4w79O_MvH6hDEYx=cisUwyf7CB4OovHEVaYUg@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de bmlXIlnmEw6YXRL4MFmlmwkcLuORi+EJUH2a/u/mHMrA==
Cancel-Lock: sha1:Ucm119i4u8dG58KKw19d8WbftRo= sha256:fTm9/6Y9cWBAAtIdX8R4WPi/R5yRhbIDD3fYGG4W+oM=
Return-Path: <mk1853387@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=DktrdW3f;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.197
X-Spam-Level: *
X-Spam-Evidence: '*H*': 0.61; '*S*': 0.00; 'knows': 0.04;
'subject:python': 0.06; 'translate': 0.07; 'python.': 0.08;
'meant': 0.09; '&gt;': 0.14; 'help,': 0.14; 'url:mailman': 0.15;
'"get': 0.16; '(even': 0.16; '2024': 0.16; 'algorithm,': 0.16;
'brush': 0.16; 'case?': 0.16; 'frame,': 0.16; 'it."': 0.16;
'presumably': 0.16; 'specify': 0.16; 'src:': 0.16;
'subject:simple': 0.16; 'url:doc': 0.16; 'url:tutor': 0.16;
'using.': 0.16; 'variant': 0.16; 'wrote:': 0.16; 'problem': 0.16;
'instead': 0.17; "can't": 0.17; 'uses': 0.19; 'figure': 0.19;
'to:addr:python-list': 0.20; 'subject:: [': 0.21; 'subject:] ':
0.21; 'to:no real name:2**1': 0.22; 'code': 0.23; 'subject:How':
0.23; 'idea': 0.24; 'url-ip:188.166.95.178/32': 0.25; 'url-
ip:188.166.95/24': 0.25; 'examples': 0.25; 'url:listinfo': 0.25;
'url-ip:188.166/16': 0.25; 'seems': 0.26; 'object': 0.26;
'perform': 0.26; 'solution.': 0.26; 'wrong': 0.28; 'environment':
0.29; 'attempt': 0.31; 'seem': 0.31; 'skip:_ 40': 0.31; 'am,':
0.31; 'approach': 0.31; 'url-ip:188/8': 0.31; "doesn't": 0.32;
'question': 0.32; 'rapidly': 0.32; 'retrieve': 0.32;
'subject:Tutor': 0.32; 'message-id:@mail.gmail.com': 0.32; 'but':
0.32; 'there': 0.33; 'focus': 0.33; 'someone': 0.34; 'same': 0.34;
'package': 0.34; 'header:In-Reply-To:1': 0.34;
'received:google.com': 0.34; 'trying': 0.35; 'fine': 0.35;
'following': 0.35; 'from:addr:gmail.com': 0.35; 'target': 0.36;
'people': 0.36; 'change': 0.36; 'using': 0.37; 'way': 0.38;
'could': 0.38; 'thanks': 0.38; 'enough': 0.39; 'mentioned': 0.39;
'still': 0.40; 'define': 0.40; 'exact': 0.40; 'learn': 0.40;
'both': 0.40; 'want': 0.40; 'should': 0.40; 'including': 0.60;
'email.': 0.61; 'tutor': 0.61; 'days': 0.62; 'skip:m 20': 0.63;
'between': 0.63; 'share': 0.63; 'contacting': 0.64; 'willing':
0.64; 'overall': 0.64; 'your': 0.64; 'parts': 0.65; 'look': 0.65;
'well': 0.65; 'skip:t 20': 0.66; 'time.': 0.66; 'outside': 0.67;
'skip:e 20': 0.67; 'right': 0.68; 'account.': 0.68; 'exactly':
0.68; 'url:index': 0.68; 'order': 0.69; 'apply.': 0.69; 'times':
0.69; 'below': 0.69; 'site': 0.70; 'solutions': 0.70; 'skip:a 40':
0.70; 'unsubscribe': 0.72; 'june': 0.73; 'costs': 0.74; '(e.g.,':
0.76; 'limits': 0.76; 'spent': 0.81; 'barriers': 0.84; 'capture':
0.84; 'constraints': 0.84; 'from.': 0.84; 'learn,': 0.84;
'magnificent': 0.84; 'nao': 0.84; 'parts.': 0.84; 'robot': 0.84;
'saturday,': 0.84; 'struggle': 0.84; 'subject: \n ': 0.84;
'task,': 0.84; '\xc3\xa9crit\xc2\xa0:': 0.84; 'equipment.': 0.91;
'largely': 0.91; 'relates': 0.91; 'aspects': 0.93
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1719093293; x=1719698093; darn=python.org;
h=to:subject:message-id:date:from:in-reply-to:references:mime-version
:from:to:cc:subject:date:message-id:reply-to;
bh=+ZzEW245nMbcDgelqCViOqu+XLTHIX5ITGGxdrdFbOo=;
b=DktrdW3fjYZrmECu/r2D3B56oUIcXCPyMKHPTAreWALuO9xqz0KGUjuYpv6DMYYRmX
BhDjwjIKLx8RdMGvCH6gNxsv/q7+0DANa08aiU5SC0WkQjgwQNfMv3g5uY0AgwVNZX3S
icFOFnYTa4ZWd+DaXWjt0ZlylybCQSMl+FrXE5NRNIGy9cKJq61B/8a//acsM0aahIsF
9AFJyyiejlVKa3efe/zXoKKdO5Agd75qhicKLWyw7G5mSGiajcDh4F8mBT54yHFzz/hZ
mKhACzlLWWJJ7JQ9ATrfdT8Y9BibLRYrFVQV9XwEor/M0oxolQ/FG6a/UmkXfkQ8JxWe
BT8A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1719093293; x=1719698093;
h=to:subject:message-id:date:from:in-reply-to:references:mime-version
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=+ZzEW245nMbcDgelqCViOqu+XLTHIX5ITGGxdrdFbOo=;
b=UFXUe34MFUB3jKLSYmMKfcsyby4F4vbSfmdI6bXtKzXaOu0GosTDwlcGYd6P15qc2H
WWWlXjT4TjYD0eX7MxgZvvN+PKMLRap+dHEoG6bVDeHGwpeOTnsKOL/h4kdvP66K8YEZ
wO0M0OREXNfP0sJbFb9tYkK8OmGSNCvtc2u3LnJmG0+oR91/jskqWFAjCRVCjBeBqpwg
jaaAL8onPbfrBYhx32P7MQBXsaf+I4/qBiR1PJ+8ybhASn7zKREEWBz9s6ZK8V40A8L9
E3VGIT9/1wQPFDcOfAuvuKJ8Rgd1txbt+a6OlwTdOxJn+DIYBFfxRJIRYYALKQcUy1rq
ZpTA==
X-Forwarded-Encrypted: i=1;
AJvYcCVzcS2f3DXIT8zhzMnm/N+idhuXHmM8ALoI+oovpCRNeq8YJU7RJQdcEpmv6iNzBUwc3VB3qAX2oJGcQrt8g8BpWbM7cHX9HCwf1JbltCIUBmeUPqzOMmW6
X-Gm-Message-State: AOJu0Ywmr89jB0Aoom8geH+ulI0YYQ2PSJF8FdY9ZLhqvhk7zzSc7G2m
LUHAfMbz04RA9NSQtCZFRxCD1VSHuim+c6u+FKRPjPas1biCBFo28tu4s814FgK9bpZ84VkWXiL
ETelsr/q8OcNlLt+WdNI5MIoN/D4=
X-Google-Smtp-Source: AGHT+IEr8gGnC0ympzjlHqqWtLsW0lDiRJAmgYsF9h730mG3uTlFX/OiT9WW/eKrVVMLuqnAeQfm8V3+VXpsFC2Hzsc=
X-Received: by 2002:a05:6a20:2d84:b0:1b4:cd5f:4e0a with SMTP id
adf61e73a8af0-1bcee665f66mr1385241637.13.1719093292863; Sat, 22 Jun 2024
14:54:52 -0700 (PDT)
In-Reply-To: <ONmXENWwuhv8ecUmN9VPG_lXN-V0ounT-EYQ-52iWvlRdv_6l6OPN_1hB4vPzqqlg_ioyEJT5LuH512V8iATfI2kzKuXVbygx8j9tiSLgzM=@proton.me>
X-Content-Filtered-By: Mailman/MimeDel 2.1.39
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CAGJtH9SY=VEAP4w79O_MvH6hDEYx=cisUwyf7CB4OovHEVaYUg@mail.gmail.com>
X-Mailman-Original-References: <CAGJtH9SdZvsrgLHnC+NSmj9P9ykG8qXj2JXk27ai=HAYaam-GQ@mail.gmail.com>
<ONmXENWwuhv8ecUmN9VPG_lXN-V0ounT-EYQ-52iWvlRdv_6l6OPN_1hB4vPzqqlg_ioyEJT5LuH512V8iATfI2kzKuXVbygx8j9tiSLgzM=@proton.me>
View all headers

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
>

1

rocksolid light 0.9.8
clearnet tor