lge-ros2 / cloisim

Unity3D based multi-robot simulator can bring-up simulation environment by SDF(Simulation Description File) easily. And it supports to connect ROS2 through cloisim_ros.
https://github.com/lge-ros2/cloisim/wiki
MIT License
143 stars 20 forks source link

Gazebo's World import[Question] #108

Closed eliabntt closed 3 weeks ago

eliabntt commented 3 years ago

Hi, I've read that you support sdf. Is it possible to load gazebo world files with objects/meshes[for example AWS's world environments]?

hyunseok-yang commented 3 years ago

@eliabntt Hi, yes, technically it should be worked.

And I've already tested one of AWS's world environment. smallhouse?

But there is one potential problem with collision area. It limit the number of mesh's vertex by convex hull in physics engine of Unity(PhysX).

For example, if the small props like picture frame is on the middle of shelf, the props can blow away. Because the mesh for collision of shelf object will be processed with convex hull option along with applying articulation body(even rigidbody).

Articulation Body(or rigidbody) does not SUPPORT the mesh collider with NON convex hull option.

So if you remove the the SDF element including mass, CLOiSim will not create the articulation body. Then you can avoid the expected behavior what I mentioned above.

hyunseok-yang commented 3 years ago

if you have any good idea to solve the problem, please let me know ;)

eliabntt commented 3 years ago

oh, that's great. I've used smallhouse in my latest works actually!!

proposed solution: disable collisions for world objects (while keeping collisions between world and robot). But idk how much this is feasible.

eliabntt commented 3 years ago

btw, with your plugins I should be able to import that directly into unity right?

hyunseok-yang commented 3 years ago

oh, that's great. I've used smallhouse in my latest works actually!!

proposed solution: disable collisions for world objects (while keeping collisions between world and robot). But idk how much this is feasible.

Yes! if you have some trouble with world, you'd better comment out the collision or element in element in world file(smalll house).

hyunseok-yang commented 3 years ago

btw, with your plugins I should be able to import that directly into unity right?

You mean CLOiSimPlugins(?) which written in C# code?

Hm. I don't understand the situation you mentioned exactly. But you can create your own plugin and build.

As a future work, I'm looking for way to import a user defined plugin like Native c++ library

eliabntt commented 3 years ago

I think I'll try this next week. The question was to understand if I can use your work only to import my world to unity and then work with my own scripts w/o having to use your whole simulation environment :)

hyunseok-yang commented 3 years ago

As I mentioned, you can import your world to unity considering the limitation I've explained.

May I ask what your script do? handling sensor data? or control robot?

eliabntt commented 3 years ago

I've yet to try this. Anyway, I want to generate data and use a indoor realistically looking environment :)

On Sun, 30 May 2021 at 06:03, Hyunseok @.***> wrote:

As I mentioned, you can import your world to unity considering the limitation I've explained.

May I ask what your script do? handling sensor data? or control robot?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lge-ros2/cloisim/issues/108#issuecomment-850936062, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEXDUJT5CDKWADQDRE7DJGLTQG2H5ANCNFSM45TTBUQA .

hyunseok-yang commented 3 years ago

@eliabntt Ok, I see. Depends on your perception(?) engine and test environment, realistic quality may low. But, let me know if you get good result through CLOiSim :)

eliabntt commented 3 years ago

hi, sorry to bother you. Can you give me some hint on how I can load my world into unity? So far I've downloaded your repo and created a project. I see where the SDF2Unity.cs file is but I do not know how to use that. I'm very new to unity, a heads up would be appreciated.

hyunseok-yang commented 3 years ago

@eliabntt Sorry for late response, I was on vacation :)

if you want to just load your world, why don't you try with binary version? https://github.com/lge-ros2/cloisim/releases/tag/2.5.5

or you wanna try to build a project, follow the below guide. https://github.com/lge-ros2/cloisim/wiki/Build-Guide

I recommend to run the sample world first. https://github.com/lge-ros2/sample_resources

eliabntt commented 3 years ago

sorry I was on vacation too and last week I had work to do. The problem is that the -world flag doesn't seem to work. Everything I do launches the table with two robots and the box in the app.

Environments for CLOiSim
  CLOISIM_WORLD_PATH=/home/ebonetto/Downloads/cloisim/CLOiSim-linux-2.5.5/CLOiSim_Data/Resources/sample_resources-1.6.2/worlds
  CLOISIM_MODEL_PATH=/home/ebonetto/Downloads/cloisim/CLOiSim-linux-2.5.5/CLOiSim_Data/Resources/sample_resources-1.6.2/models
  CLOISIM_FILES_PATH=/home/ebonetto/Downloads/cloisim/CLOiSim-linux-2.5.5/CLOiSim_Data/Resources/sample_resources-1.6.2/media

Set current directory to /home/ebonetto/Downloads/cloisim/CLOiSim-linux-2.5.5
Found path: /home/ebonetto/Downloads/cloisim/CLOiSim-linux-2.5.5/CLOiSim.x86_64
hyunseok-yang commented 3 years ago

@

sorry I was on vacation too and last week I had work to do. The problem is that the -world flag doesn't seem to work. Everything I do launches the table with two robots and the box in the app.

Environments for CLOiSim
  CLOISIM_WORLD_PATH=/home/ebonetto/Downloads/cloisim/CLOiSim-linux-2.5.5/CLOiSim_Data/Resources/sample_resources-1.6.2/worlds
  CLOISIM_MODEL_PATH=/home/ebonetto/Downloads/cloisim/CLOiSim-linux-2.5.5/CLOiSim_Data/Resources/sample_resources-1.6.2/models
  CLOISIM_FILES_PATH=/home/ebonetto/Downloads/cloisim/CLOiSim-linux-2.5.5/CLOiSim_Data/Resources/sample_resources-1.6.2/media

Set current directory to /home/ebonetto/Downloads/cloisim/CLOiSim-linux-2.5.5
Found path: /home/ebonetto/Downloads/cloisim/CLOiSim-linux-2.5.5/CLOiSim.x86_64

Hi, did you try with the command like this? -> "./run.sh your_world.world"

the world file should be located in '/home/ebonetto/Downloads/cloisim/CLOiSim-linux-2.5.5/CLOiSim_Data/Resources/sample_resources-1.6.2/worlds'