How to set joint value on custom robot arm using python script

I have imported custom robot arm and known how to use simple_joint_control package to control joint value using widget, but I want to know how to set joint value directly using python script rather than using slide bar in widget GUI.

@Hammad_M

Hi newuhe, you can try one of these two options:

  • Create the CompositeProto message in your own PyCodelet. Take a look at simple_joint_control.ipynb, the slidebar values are convert to joint angle commands by the JointControl PyCodelet (in the third cell of the notebook) using create_composite_message from engine/pyalice/Composite.py. You can write a similar pycodelet to create message with a predefined joint angles instead. Make sure the “entity” in the CompositeProto matches the name of the joints on your imported robot in sim.
    This is good for prototyping.

  • Using the CompositeAtlas and FollowPath codelet in packages/composite (https://docs.nvidia.com/isaac/isaac/packages/composite/doc/composite_messages.html#compositemetric-and-compositeatlas).
    Take a look at apps/samples/manipulation/shuffle_box.py, it first writes a set of named joint angle waypoints to cask (=file), then use CompositeAtlas to read back the waypoints, and FollowPath to send a sequence of those waypoints to the planner.

Thanks for replying. It really helps me. Now I want to realize TCP control, does Isaac have the Inverse Kinematic control method?