genserkins Hal-Parameter "unrotate"

More
29 Jan 2020 08:12 #156074 by Aciera
I've noticed there is an "unrotate" parameter that can be defined in the hal file:
haldata = hal_malloc(sizeof(struct haldata));
    if (!haldata)
	goto error;

    for (i = 0; i < GENSER_MAX_JOINTS; i++) {
	if ((res =
		hal_pin_float_newf(HAL_IO, &(haldata->a[i]), comp_id,
		    "genserkins.A-%d", i)) < 0)
	    goto error;
        *(haldata->a[i])=0;
	if ((res =
		hal_pin_float_newf(HAL_IO, &(haldata->alpha[i]), comp_id,
		    "genserkins.ALPHA-%d", i)) < 0)
	    goto error;
        *(haldata->alpha[i])=0;
	if ((res =
		hal_pin_float_newf(HAL_IO, &(haldata->d[i]), comp_id,
		    "genserkins.D-%d", i)) < 0)
	    goto error;
        *(haldata->d[i])=0;
        if ((res =
                hal_param_s32_newf(HAL_RW, &(haldata->unrotate[i]), comp_id,
                    "genserkins.unrotate-%d", i)) < 0)
            goto error;
        haldata->unrotate[i]=0;
    }

Given its name I presume its not to be used like the THETA parameter.
Does anybody know what this is?

Please Log in or Create an account to join the conversation.

More
31 Jan 2020 07:53 #156239 by bbsr_5a
its like the Shortest WAY if your base is at 260deg and needs to go to 10deg best is positiv but unrotate prevent it
as DOF6 some Axis can do it some will break

Please Log in or Create an account to join the conversation.

More
03 Feb 2020 09:18 #156428 by Aciera
I have found this snippet by the author of this feature in the mail archive:
On Wed, Jan 12, 2011 at 4:35 PM, Stephen Wille Padnos <spadnos@...>wrote:

> Stuart Stevenson wrote:
> > I have to move the finger and hand axes while the wrist axis moves to be
> > able maintain orientation.
> > I tried this without the multiple subtraction line but was unable to hold
> > the hand orientation while the wrist moved.
> >
> Hmmm, so joints 4 and 5 (starting at 0) both need to have joint 3
> subtracted?  The code I wrote can't do that.  It would be possible to
> make another parameter that tells which joint to unrotate by.  Something
> like base_joint.  This would be a parameter ranging from 0 to (number of
> joints-1).  The code would then be something like:
> if ((unrotate logic) && (base_joint<link_num) && (base_joint!= this_joint))
>
> joints[this_joint].theta-=joints[joints[this_joint].base_joint].theta *
> joints[this_joint].unrotate;
> (or so :) )

> - Steve

Its still not really clear to me what this does but it looks like I need to reverse engineer the code to find out.
Shows the importance of documentation in software development though.

Please Log in or Create an account to join the conversation.

Time to create page: 0.159 seconds
Powered by Kunena Forum