Skip to content

Import warning due to TargetNotSet location change in mink 0.0.11 #744

Description

@fanshJ

System Info

robosuite version: 1.5.1
mink: 0.0.12

OS version: Ubuntu 22.04

Information

When importing robosuite, the following warning appears due to mink >=0.11.0 changes:

[robosuite WARNING] Could not load the mink-based whole-body IK. Make sure you install related import properly, otherwise you will not be able to use the default IK controller setting for GR1 robot. (__init__.py:40)

This is caused by TargetNotSet being moved from mink.tasks.exceptions to mink.exceptions in mink v0.11.0. The current import in robosuite/examples/third_party_controller/mink_controller.py fails.

Reproduction

  1. Install robosuite with mink (>=0.11.0).
  2. Run import robosuite in Python.
  3. Observe the warning:
[robosuite WARNING] Could not load the mink-based whole-body IK. Make sure you install related import properly, otherwise you will not be able to use the default IK controller setting for GR1 robot. (__init__.py:40)

Expected behavior

No warning should appear.

Suggested Fix:

Update the import in mink_controller.py from:

from mink.tasks.exceptions import TargetNotSet

to:

from mink.exceptions import TargetNotSet

Or add a try-except to handle both old and new versions of mink:

try:
    from mink.tasks.exceptions import TargetNotSet
except ImportError:
    from mink.exceptions import TargetNotSet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions