Skip to content

Mobile Manipulator Bug Fix and Input Validation#1537

Merged
ASzot merged 15 commits intomainfrom
mobile_manipulator_fixes
Nov 1, 2021
Merged

Mobile Manipulator Bug Fix and Input Validation#1537
ASzot merged 15 commits intomainfrom
mobile_manipulator_fixes

Conversation

@ASzot
Copy link
Copy Markdown
Contributor

@ASzot ASzot commented Oct 14, 2021

Motivation and Context

There is a bug that sometimes occurs with the mobile manipulator after several million steps of training. The issue is self.sim_obj.joint_positions will become 0 length. I am not sure what causes this bug or how to reliably reproduce it. As a temporary solution, I've just added code to reset the episode when this happens.

Another issue was that it was easy to pass wrong joint sizes or NaN inputs to the robot and the simulation would silently fail. I tried to fix this by adding some input validation (making sure the input is the right size and not NaN) and if the validation fails, throwing an exception.

Also added kinematic control to the mobile manipulator.

How Has This Been Tested

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Oct 14, 2021
def base_pos(self, position):
def base_pos(self, position: mn.Vector3):
"""Set the robot base to a desired ground position (e.g. NavMesh point) via configured local offset from origin."""
if len(position) != 3:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Assuming this respects the typing, this should always evaluate as true. Do you mean position: Union[mn.Vector, Sequence[float], Tuple[float, float, float]] or such?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The input should be a mn.Vector3 but the user may not pass the correct input here, so I am checking the length to be sure.

Comment thread habitat_sim/simulator.py
self.renderer.start_draw_jobs()
self.step_physics(dt)

def start_async_render(self, agent_ids: Union[int, List[int]] = 0):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This isn't called anywhere is it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is used in Habitat Lab where I need to separately step physics.

@ASzot ASzot merged commit 756027f into main Nov 1, 2021
@ASzot ASzot deleted the mobile_manipulator_fixes branch November 1, 2021 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants