curobo icon indicating copy to clipboard operation
curobo copied to clipboard

Small bug in examples/isaac_sim/multi_arm_reacher.py (with fix)

Open YuhengZhi opened this issue 1 year ago • 1 comments

If it’s not a bug, please use discussions: https://github.com/NVlabs/curobo/discussions

Please provide the below information in addition to your issue:

  1. cuRobo installation mode (choose from [python, isaac sim, docker python, docker isaac sim]): isaac sim
  2. python version: Native Python 3.10 that came with isaac sim
  3. Isaac Sim version (if using): 4.1.0

Issue Details

The multi_arm_reacher example would crash if:

  1. Press play
  2. Move the red cube so the arms start moving
  3. press either "Pause" or "Stop"

The error message would be:

    if i % 100 == 0:
TypeError: not all arguments converted during string formatting

The issue is due to an out-of-scope iterator variable i in these lines. The fix is simply change the i's to, e.g., k

for k in target_links.keys():
    c_p, c_rot = target_links[k].get_world_pose()
    link_poses[k] = Pose(
        position=tensor_args.to_device(c_p),
        quaternion=tensor_args.to_device(c_rot),
    )

YuhengZhi avatar Aug 20 '24 02:08 YuhengZhi

Thanks! You are welcome to submit a Pull Request. If we don't get one, we can fix in a future release.

balakumar-s avatar Apr 25 '25 19:04 balakumar-s