empriselab / RCareWorld

RCareWorld simulation environment for caregiving robots
https://emprise.cs.cornell.edu/rcareworld/
Apache License 2.0
97 stars 17 forks source link

`robot.data['names']` has only empty strings #147

Closed thisjustin123 closed 3 weeks ago

thisjustin123 commented 3 weeks ago

Discussed in https://github.com/empriselab/RCareWorld/discussions/94

robot.data['names'] seems to only be returning empty strings instead of the names of the joints(?).

Originally posted by **tomsilver** August 14, 2024 The output of the code below is `['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']` Code: ``` from pyrcareworld.envs.base_env import RCareWorld import numpy as np import os import argparse def _main(use_graphics=False): script_dir = os.path.dirname(os.path.abspath(__file__)) executable_file = os.path.join(script_dir, "Bathing", "BathingPlayer.x86_64") env = RCareWorld(executable_file=executable_file, graphics=use_graphics) stretch_id = 221582 robot = env.GetAttr(stretch_id) env.step() print(robot.data["names"]) if __name__ == "__main__": parser = argparse.ArgumentParser(description='Run RCareWorld bathing environment simulation.') parser.add_argument('-g', '--graphics', action='store_true', help='Enable graphics') args = parser.parse_args() _main(use_graphics=args.graphics) ```
thisjustin123 commented 3 weeks ago

Found a fix, will push soon. Joint names previously were all just empty. Made a quick utility to grab all the names.

YoruCathy commented 3 weeks ago

Addressed in https://github.com/empriselab/RCareWorld/pull/152