oscar-lima / pybullet_ros

A bridge between ROS and PyBullet
MIT License
108 stars 31 forks source link

sdf parsing problem #17

Open b4be1 opened 4 years ago

b4be1 commented 4 years ago

When running the default r2d2 example that uses https://github.com/socrob/mbot_simulation_environments, I am getting many b3Warnings, among others saying that no inertial data for links is provided. This causes pybullet_ros to crash at start. This seems to be caused by pybullet loading gazebo sdf model which is missing some fields (related issue https://github.com/robotology/icub-models/issues/12). Any suggestions how to fix it?

oscar-lima commented 3 years ago

Currently the sdf support in pybullet ros is experimental, is not an easy task to integrate as one has to parse the sdf + adapt to the structure of pybullet. Unfortunately, I think this is a larger project, one in which much more effort is needed. For now I have commented out all environment support in pybullet ros and will likely introduce the notion of one time plugin at the beginning, so users can load environments using normal pybullet code. Once I have more time I will definitely look into this in more detail.

oscar-lima commented 3 years ago

As a temporal workaround I have added en environment one time only plugin. This means that you can write python code to load your environment by using functions like self.pb.loadURDF(...) or self.pb.loadSDF(...) . Documentation has been added in the main README.md under "environment" section