multicontact-locomotion-planning icon indicating copy to clipboard operation
multicontact-locomotion-planning copied to clipboard

Ros pack fails to load robot model in tsid whobody motion generation

Open stonneau opened this issue 3 years ago • 3 comments

Here https://github.com/loco-3d/multicontact-locomotion-planning/blob/master/python/mlp/wholebody/tsid.py#L375 Apparently the method getPath is not able to handle slashes "/" when retrieving packages. Subsequently the loading of a wholebody motion method with Talos leads to the following error:


  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/media/data/dev/linux/hpp/src/multicontact-locomotion-planning/python/mlp/__main__.py", line 29, in <module>
    loco_planner.run()
  File "/media/data/dev/linux/hpp/src/multicontact-locomotion-planning/python/mlp/loco_planner.py", line 239, in run
    self.run_wholebody(iter_dynamic_filter)
  File "/media/data/dev/linux/hpp/src/multicontact-locomotion-planning/python/mlp/loco_planner.py", line 135, in run_wholebody
    self.cs_wb = generate_wholebody(self.cfg, self.cs_ref, self.fullBody, self.viewer)
  File "/media/data/dev/linux/hpp/src/multicontact-locomotion-planning/python/mlp/wholebody/tsid.py", line 375, in generate_wholebody_tsid
    package_path = rp.get_path(cfg.Robot.packageName)
  File "/home/stevet/.local/lib/python3.6/site-packages/rospkg/rospack.py", line 207, in get_path
    raise ResourceNotFound(name, ros_paths=self._ros_paths)
rospkg.common.ResourceNotFound: example-robot-data/robots/talos_data

@nim65s as discussed yesterday.

This is temporarily fixed by directly inputing the urdf path manually:

urdf = "/opt/openrobots/share/example-robot-data/robots/talos_data"+'/urdf/' + cfg.Robot.urdfName + cfg.Robot.urdfSuffix + '.urdf'

Thank you very much !

stonneau avatar Oct 13 '20 08:10 stonneau