Skip to content

Expose TaskContactForceEquality python binding #247

Open
@danielcostanzi18

Description

@danielcostanzi18

Hello everyone,

First off, thanks a lot for the great work on TSID!
I want to use TSID to control the force at the end effector of a manipulator, to do so I want to use the task TaskContactForceEquality. The problem is that it's python binding is not exposed.
I tried to naively expose it with these changes.

When I try to instantiate the task I get the following error:

ArgumentError: Python argument types in
TaskContactForceEquality.init(TaskContactForceEquality, str, RobotWrapper, float, Contact6d)
did not match C++ signature:
init(_object*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > name, tsid::robots::RobotWrapper {lvalue} robot, double dt, tsid::contacts::ContactBase {lvalue} contact)

It seems that the problem lies in the type of contact that I am passing, which is of type tsid.tsid_pywrap.Contact6d. From the C++ signature, it appears that the constructor expects tsid::contacts::ContactBase instead.

Could anyone shed light on how I might resolve this mismatch or if there's an alternative way to expose the correct binding for Contact6d?

If you want to reproduce the issue you can launch the example that I prepared exercizes/ex_5_ur5_force_task.py.

Thanks in advance for your help!

Best regards,
Daniel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions