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

Unable to start ignition gazebo simulation from README instructions #23

Closed
electrobusy opened this issue May 15, 2022 · 4 comments · Fixed by #24
Closed

Unable to start ignition gazebo simulation from README instructions #23

electrobusy opened this issue May 15, 2022 · 4 comments · Fixed by #24
Labels
documentation Improvements or additions to documentation

Comments

@electrobusy
Copy link
Contributor

electrobusy commented May 15, 2022

Hej Kimberly,

After following your README instructions, I am unable to start the simulation, because it seems that it can't locate simulation world:

electrobusy@mmk-laptop:~$ ign gazebo crazyflie_world.sdf 
Unable to find or download file 

Environment variable set in bashrc file:

(...)

source /opt/ros/noetic/setup.bash
source catkin_ws/devel/setup.bash --extended

# add path to where crazyflie gazebo ignition sim files are
export IGN_GAZEBO_RESOURCE_PATH="$HOME/crazyflie-simulation/gazebo-ignition/"

After sourcing it (knowing that Ignition gazebo looks for IGN_GAZEBO_RESOURCE_PATH* as mentioned here under "Models, lights, actors"), the absolute paths seem to be correctly set:

electrobusy@mmk-laptop:~$ echo $IGN_GAZEBO_RESOURCE_PATH*
/home/electrobusy/crazyflie-simulation/gazebo-ignition/controllers /home/electrobusy/crazyflie-simulation/gazebo-ignition/crazyflie /home/electrobusy/crazyflie-simulation/gazebo-ignition/worlds
electrobusy@mmk-laptop:~$ echo $IGN_GAZEBO_RESOURCE_PATH
/home/electrobusy/crazyflie-simulation/gazebo-ignition/
electrobusy@mmk-laptop:~$ ign gazebo crazyflie_world.sdf 
Unable to find or download file 

Some questions (that might help me):

  1. Did you happen to install ignition from source or binaries?
  2. Have you set any other environment variables (for ignition gazebo)?

Thank you,
Rohan

Ps.: I am using Ubuntu 20.04 with Ignition gazebo 6.9.0 (Ignition Fortress)

@knmcguire
Copy link
Member

Hi! Let's try to solve this for you.

  1. I installed ignition from binaries
  2. Yes I do, which is IGN_GAZEBO_SYSTEM_PLUGIN_PATH, but that is for building the controller. that is still not working yet, see this issue Get Multicopter velocity control to work with the crazyflie model #6. This is not what should have affected you what you are having now though.

Perhaps the export should point to the world folder instead? Sorry, I have it setup on my old computer as I'm now converting to my new one, so I can't double check it right now.

@knmcguire
Copy link
Member

So some more information on my previous system now that I got a hold of it again:

Ignition gazebo: 6.6.0
Ubuntu 20.04

In .bashrc:
export IGN_GAZEBO_RESOURCE_PATH="$HOME/Development/Bitcraze/Simulation/crazyflie_simulation/gazebo-ignition/"

I indeed get the same issue as you, and now I remember why. The IGN_GAZEBO_RESOURCE_PATH is not for the world file, but to find the crazyflie model. So you would need to still cd into the worlds folder in order to run that .sdf file. But I also saw that the world folder itself can be added to the IGN_GAZEBO_RESOURCE_PATH as well, so I'll update the readme.

knmcguire added a commit that referenced this issue May 16, 2022
@knmcguire knmcguire linked a pull request May 16, 2022 that will close this issue
@knmcguire knmcguire added the documentation Improvements or additions to documentation label May 16, 2022
@electrobusy
Copy link
Contributor Author

Sorry for the late reply.

I tried your latest fix and, after sourcing the bashrc file, it still does not find the world file.

I only managed to run the simulation with the following steps:

  1. cd to the crazyflie folder and run the .config file (to load the 3D model of the crazyflie): ign gazebo model.config
  2. cd to the worlds folder and run the crazyflie_world.sdf file

NOTE: I also tried to set the IGN_GAZEBO_SERVER_CONFIG_PATH with the (absolute) path of .config file. Surprisingly, even that did not make a difference.

# add path to where gazebo ignition sim files are 
export IGN_GAZEBO_RESOURCE_PATH="$HOME/crazyflie-simulation/gazebo-ignition/":"$HOME/crazyflie_simulation/gazebo-ignition/worlds/"
export IGN_GAZEBO_SERVER_CONFIG_PATH="$HOME/crazyflie-simulation/gazebo-ignition/crazyflie/model.config"

Ps.: I wonder if the ign gazebo version difference plays a role here (to be checked on my side whenever I get the chance)

@knmcguire
Copy link
Member

ah oke.. at least you got it to run.

I'm afraid then that this is an issue that we have to pass to the gazebo answers then. Wonder if this has anything with the name change they have done, as they reverted it all back to good old 'only' gazebo, not ignition gazebo.

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

Successfully merging a pull request may close this issue.

2 participants