Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
stonneau opened this issue Oct 13, 2020 · 3 comments
Open
Assignees

Comments

@stonneau
Copy link
Contributor

stonneau commented Oct 13, 2020

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 !

@nim65s nim65s self-assigned this Oct 13, 2020
@nim65s
Copy link
Contributor

nim65s commented Oct 13, 2020

Do you need only stuff from example-robot-data, or do you plan to use models from elsewhere ?

@stonneau
Copy link
Contributor Author

To be completely honest I have no idea why this package is loaded.
I d say in general we want to use models from elsewhere because this is not limited to laas

@pFernbach
Copy link
Member

pFernbach commented Oct 13, 2020

Yes, we need to be able to use any other kind of models from different packages.
I think that this issue should not be fixed here but in the talos-rbprm (and all the other {robot}-rbprm packages). It make sens to me to constraint packageName to be a single name and not a relative path.

I need to check the Robot class to see which variables we could use to correctly define this or if we need to add another variable.

A quick and simple fix in this package would be to extract the first part of the string before the first /, call get_path with it and append the second part of the string to the result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants