gazebosim / gz-sim

Open source robotics simulator. The latest version of Gazebo.
https://gazebosim.org
Apache License 2.0
701 stars 265 forks source link

Models are broken when inserting from Fuel #350

Closed Reka-Berci-Hajnovics closed 4 years ago

Reka-Berci-Hajnovics commented 4 years ago

I've tried to drag and drop several models from Fuel, but they're not loaded correctly. The red hatchback model cannot find the wheel textures, the PR2_SDF17 has some problems at the joint description, and the x4_uav model doesn't give any errors, but it is exploded. hatchback_ogre2 PR2_SDF17_ogre2 x4_uav_ogre2

I've copied the empty.sdf file in my own folder and changed the rendering to ogre, as described here: https://github.com/ignitionrobotics/ign-gazebo/issues/344#issuecomment-691182579 When I'm running the updated file the ignition collapses as soon as I try to insert any model from Fuel. ogre_fuel

chapulina commented 4 years ago

Some problems loading models are issues with the model, others are issues on Ignition. This is the flow to address these issues:

  1. Is it a bug in Ignition, such as a crash or some mesh that's loading incorrectly?
    • Ticket an issue in the appropriate library if there isn't yet an issue for that specific bug.
  2. Is it a problem with the model description itself (i.e. it doesn't follow the guidelines in https://github.com/ignitionrobotics/ign-gazebo/pull/400)?

That said, about the specific models you're trying to load:

claireyywang commented 4 years ago

I was able to reproduce this on Citadel and Dome (both source build) on Bionic 18.04. Though my models look a bit better.

It looks like a sdformat bug.

Here's the terminal output and screenshot:

[Err] [SDFFeatures.cc:720] Asked to create a joint between links [torso_lift_link] as parent and [torso_lift_motor_screw_link] as child, but the child link already has a parent joint of type [RevoluteJoint].
[Err] [SDFFeatures.cc:720] Asked to create a joint between links [r_gripper_r_finger_tip_link] as parent and [r_gripper_motor_screw_link] as child, but the child link already has a parent joint of type [RevoluteJoint].
[Err] [SDFFeatures.cc:720] Asked to create a joint between links [r_gripper_l_finger_tip_link] as parent and [r_gripper_motor_screw_link] as child, but the child link already has a parent joint of type [RevoluteJoint].
[Err] [SDFFeatures.cc:720] Asked to create a joint between links [r_gripper_r_parallel_link] as parent and [r_wrist_roll_link] as child, but the child link already has a parent joint of type [RevoluteJoint].
[Err] [SDFFeatures.cc:720] Asked to create a joint between links [r_gripper_l_parallel_link] as parent and [r_wrist_roll_link] as child, but the child link already has a parent joint of type [RevoluteJoint].
[Err] [SDFFeatures.cc:720] Asked to create a joint between links [r_gripper_r_parallel_link] as parent and [r_gripper_r_finger_tip_link] as child, but the child link already has a parent joint of type [RevoluteJoint].
[Err] [SDFFeatures.cc:720] Asked to create a joint between links [r_gripper_l_parallel_link] as parent and [r_gripper_l_finger_tip_link] as child, but the child link already has a parent joint of type [RevoluteJoint].
[Err] [SDFFeatures.cc:720] Asked to create a joint between links [r_gripper_r_finger_tip_link] as parent and [r_gripper_l_finger_tip_link] as child, but the child link already has a parent joint of type [RevoluteJoint].
[Err] [SDFFeatures.cc:720] Asked to create a joint between links [l_gripper_r_finger_tip_link] as parent and [l_gripper_motor_screw_link] as child, but the child link already has a parent joint of type [RevoluteJoint].
[Err] [SDFFeatures.cc:720] Asked to create a joint between links [l_gripper_l_finger_tip_link] as parent and [l_gripper_motor_screw_link] as child, but the child link already has a parent joint of type [RevoluteJoint].
[Err] [SDFFeatures.cc:720] Asked to create a joint between links [l_gripper_r_parallel_link] as parent and [l_wrist_roll_link] as child, but the child link already has a parent joint of type [RevoluteJoint].
[Err] [SDFFeatures.cc:720] Asked to create a joint between links [l_gripper_l_parallel_link] as parent and [l_wrist_roll_link] as child, but the child link already has a parent joint of type [RevoluteJoint].
[Err] [SDFFeatures.cc:720] Asked to create a joint between links [l_gripper_r_parallel_link] as parent and [l_gripper_r_finger_tip_link] as child, but the child link already has a parent joint of type [RevoluteJoint].
[Err] [SDFFeatures.cc:720] Asked to create a joint between links [l_gripper_l_parallel_link] as parent and [l_gripper_l_finger_tip_link] as child, but the child link already has a parent joint of type [RevoluteJoint].
[Err] [SDFFeatures.cc:720] Asked to create a joint between links [l_gripper_r_finger_tip_link] as parent and [l_gripper_l_finger_tip_link] as child, but the child link already has a parent joint of type [RevoluteJoint].

dark_pr2

chapulina commented 4 years ago

Thanks for checking @claireyywang . I think there are 2 separate issues. I also get the error messages, but I don't see any broken behaviour on the robot, pressing play all the joints seem to be in place.

The most pressing issue are the distorted meshes, and I'm not sure how to reproduce that.

Reka-Berci-Hajnovics commented 4 years ago

Some problems loading models are issues with the model, others are issues on Ignition. This is the flow to address these issues:

  1. Is it a bug in Ignition, such as a crash or some mesh that's loading incorrectly?

    • Ticket an issue in the appropriate library if there isn't yet an issue for that specific bug.
  2. Is it a problem with the model description itself (i.e. it doesn't follow the guidelines in #400)?

That said, about the specific models you're trying to load:

I'm using Ignition Citadel, Ubuntu 20.04, and my graphics card is: NVIDIA Corporation GP106BM [GeForce GTX 1060 Mobile 6GB]

azeey commented 4 years ago

The distorted meshes appear to be similar to https://github.com/osrf/subt/issues/438. Can you try testing with the instructions in this or this comments?

The [Err] [SDFFeatures.cc:720] Asked to create a joint between links [torso_lift_link] as parent and [torso_lift_motor_screw_link] as child, but the child link already has a parent joint of type [RevoluteJoint]. errors are most likely due to the fact that ign-gazebo doesn't currently support kinematic loops with DART.

chapulina commented 4 years ago

Oh so this is another locale issue. Here are other related issues: https://github.com/ignitionrobotics/ign-rendering/issues/101, https://github.com/ignitionrobotics/ign-rendering/issues/136

claireyywang commented 4 years ago

@anindex fyi

Reka-Berci-Hajnovics commented 4 years ago

The distorted meshes appear to be similar to osrf/subt#438. Can you try testing with the instructions in this or this comments?

The [Err] [SDFFeatures.cc:720] Asked to create a joint between links [torso_lift_link] as parent and [torso_lift_motor_screw_link] as child, but the child link already has a parent joint of type [RevoluteJoint]. errors are most likely due to the fact that ign-gazebo doesn't currently support kinematic loops with DART.

I've tried to run Ignition with an english locale like suggested in the links above and it worked! Thanks! I haven't changed the whole system locale I just used the following command to run Ignition:

LC_ALL=C LANG=C ign gazebo empty.sdf

I still receive some errors, but the meshes are rendered properly. fuel_model

chapulina commented 4 years ago

Closing this issue. Summary: