Skip to content

Fix contact points#5974

Merged
BenjaminDeleze merged 4 commits intomasterfrom
hotfix-disable-contact-point-tracking
Mar 9, 2023
Merged

Fix contact points#5974
BenjaminDeleze merged 4 commits intomasterfrom
hotfix-disable-contact-point-tracking

Conversation

@BenjaminDeleze
Copy link
Copy Markdown

@BenjaminDeleze BenjaminDeleze commented Mar 8, 2023

Description
I found three issues with contact points:

  • Since the first wb_supervisor_node_enable_contact_points_tracking, a wb_supervisor_node_enable_contact_points_tracking or wb_supervisor_node_disable_contact_points_tracking command was sent at every timeStep. It was because we were not resetting the right boolean. This issue was present since this feature was introduced, but it was only recently made visible because of new warning messages (Improve enable/disable pose tracking API function #5638).
  • The second issue is related with the changes from Fixes supervisor node python API #5633.
    • It seems that the idea was to remove the include_descendants of the wb_supervisor_node_disable_contact_points_tracking function.
    • However, we use both the solid and the include_descendants parameters to disable the tracking in the Webots side:
      if (mTrackedContactPoints[i].solid == solid && mTrackedContactPoints[i].includeDescendants == includeDescendants) {
    • The result is that if we use wb_supervisor_node_enable_contact_point_tracking with include_descendants = True, then it is not possible to disable it later (and worse we risk to disable the tracking of the same solid but without the descendants
    • It seems consistent (but still wrong) with the python and matlab API. However when looking in the C++ one, it turns out that its ignore the include_descendants parameter also for the enableContactPointsTracking which is a loss of functionality (but does not seem new):
      wb_supervisor_node_enable_contact_points_tracking(nodeRef, samplingPeriod, false);

@omichel do you have an idea of why you wanted to remove the include_descendants parameter?

  • The test API/contact_points_and_center_of_mass issues a lot of warnings but the test still succeed:
WARNING: DEF contact_points_and_center_of_mass Robot: No active contact points tracking could be found for the node 'Robot'.
WARNING: DEF contact_points_and_center_of_mass Robot: 'wb_supervisor_node_enable_contact_point_tracking' called for an invalid node.
Error: wb_supervisor_node_disable_pose_tracking() called with a NULL or invalid 'node' argument.

As discussed, we will not fix the test for now

@BenjaminDeleze BenjaminDeleze added the bug Something isn't working label Mar 8, 2023
@BenjaminDeleze BenjaminDeleze added this to the R2023a-rev1 milestone Mar 8, 2023
@BenjaminDeleze BenjaminDeleze self-assigned this Mar 8, 2023
Benjamin Deleze added 2 commits March 8, 2023 16:47
@BenjaminDeleze BenjaminDeleze added the test suite Start the test suite label Mar 8, 2023
@BenjaminDeleze BenjaminDeleze marked this pull request as ready for review March 8, 2023 16:07
@BenjaminDeleze BenjaminDeleze requested a review from a team as a code owner March 8, 2023 16:07
Copy link
Copy Markdown
Member

@omichel omichel left a comment

Choose a reason for hiding this comment

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

That looks good to me.

@BenjaminDeleze BenjaminDeleze merged commit 9c64695 into master Mar 9, 2023
@BenjaminDeleze BenjaminDeleze deleted the hotfix-disable-contact-point-tracking branch March 9, 2023 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working test suite Start the test suite

Development

Successfully merging this pull request may close these issues.

2 participants