Skip to content

[BUG] There are some missing bindings in the class DQ_CoppeliaSimInterfaceZMQ #62

@juanjqo

Description

@juanjqo

Code of Conduct

By submitting this report you automatically agree that you've read and accepted the following conditions.

  • Support for DQ Robotics is given voluntarily and it's not the developers' role to educate and/or convince anyone of their vision.
  • Any possible response and its timeliness will be based on the relevance, accuracy, and politeness of a request and the following discussion.
  • If a DQ Robotics member replies, the user must let them know if their response solves their issue or not.
  • Any suggestion/advice/request made by anyone, as well intentioned as they might be, might not be incorporated into DQ Robotics.

Bug description
@dqrobotics/developers

Hi @mmmarinho,

The current Python version of the class DQ_CoppeliaSimInterfaceZMQ has some missing bindings. For instance, the following methods are not available for the user:

  • set_stepping_mode()

  • get_object_handle(), get_object_handle()

  • get_joint_{velocities, torques}(), set_joint_target_velocities(),

  • set_joint_torques()

Code

from dqrobotics.interfaces.coppeliasim import DQ_CoppeliaSimInterfaceZMQ


def main() -> None:
    vi = DQ_CoppeliaSimInterfaceZMQ()
    try:
        vi.connect("127.0.0.1", 19997, 1000, 10) # "127.0.0.1", 19997, 1000, 10

        try:
            vi.set_stepping_mode(True)
        except (Exception, KeyboardInterrupt) as e:
            print(e)
            pass

        try:
            vi.get_object_handle("/Floor")
        except (Exception, KeyboardInterrupt) as e:
            print(e)
            pass

        try:
            vi.get_object_handles(["/Floor", "/Floor"])
        except (Exception, KeyboardInterrupt) as e:
            print(e)
            pass


        vi.start_simulation()
        vi.stop_simulation()

    except (Exception, KeyboardInterrupt) as e:
        print(e)
        pass

if __name__ == "__main__":
    main()

Output

The port 19997 is commonly used in the legacy API. However it is not compatible with the ZMQ Remote API.
I changed the port to 23000
'dqrobotics._dqrobotics._interfaces._coppeliasim.DQ_CoppeliaSimInterfaceZMQ' object has no attribute 'set_stepping_mode'
'dqrobotics._dqrobotics._interfaces._coppeliasim.DQ_CoppeliaSimInterfaceZMQ' object has no attribute 'get_object_handle'
'dqrobotics._dqrobotics._interfaces._coppeliasim.DQ_CoppeliaSimInterfaceZMQ' object has no attribute 'get_object_handles'

Process finished with exit code 0

Expected behavior

  • All public methods of the DQ_CoppeliaSimInterfaceZMQ.cpp class are expected to be exposed to the user.

Environment:

  • OS: Ubuntu 24.04 LTS
  • dqrobotics version 23.4.0a45
  • Python version: 3.12

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions