Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Skin contacts on wbd #239

Merged
merged 1 commit into from
Aug 10, 2017
Merged

Skin contacts on wbd #239

merged 1 commit into from
Aug 10, 2017

Conversation

fjandrad
Copy link
Collaborator

Enables the reading of the contact position using the skin.

it->setActiveTaxels(0);
numberOfContacts++;
}
yInfo() << "wholeBodyDynamics: numberOfContacts in contactsReadFromSkin from previous contacts = "<<numberOfContacts;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are again a lot of prints that I guess need to be removed, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so should I remove all of this messages that are not on the warning level?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will leave this part commented since it will probably come useful when we try again with Joans stuff

/*else
        {
             yDebug() << "wholeBodyDynamics: number of contacts in submodel "<<subModel<<" = "<<contacts_for_given_subModel[subModel];
        }*/

if( it->getActiveTaxels()<10)
{
it->fixMoment();
yDebug() << "wholeBodyDynamics: less than 10 taxels are active then suppose zero moment";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be removed?

}
else
{
if(yarp::os::Time::now()-last_reading_skin_contact_list_Stamp>SKIN_EVENTS_TIMEOUT && last_reading_skin_contact_list_Stamp!=0.0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should we remove this one?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I probably copy-pasted the debug print comment on this.

{

contactsReadFromSkin.clear();
yInfo() << "wholeBodyDynamics: Resetting skin contact for timeout";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be removed?

yInfo() << "wholeBodyDynamics: Resetting skin contact for timeout";
}

yInfo() << "wholeBodyDynamics: Using default contact";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be removed (together with all following prints).

@@ -566,6 +566,7 @@ bool WholeBodyDynamicsDevice::loadSettingsFromConfig(os::Searchable& config)
settings.forceTorqueFilterCutoffInHz = 3.0;
settings.jointVelFilterCutoffInHz = 3.0;
settings.jointAccFilterCutoffInHz = 3.0;
useSkinContact =false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to remove this parameter, so the skin position readings works out of the box if you just connect the ports, as it happened on the older version of wholeBodyDynamics .

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@@ -1,6 +1,8 @@
#ifndef CODYCO_WHOLE_BODY_DYNAMICS_DEVICE_H
#define CODYCO_WHOLE_BODY_DYNAMICS_DEVICE_H

#define SKIN_EVENTS_TIMEOUT 0.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can move this define in the .cpp file.

* Double to keep track of last time skin was read
* (to verify timeouts).
*/
double last_reading_skin_contact_list_Stamp;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick, but given that all attributes are using CamelCase naming, I would suggest to use CamelCase (with lower capital letter) also for this parameter.

@traversaro traversaro mentioned this pull request Aug 10, 2017
@traversaro
Copy link
Contributor

This is good to go. Call me when you want to merge this, so I can show you how to rebase.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants