-
Notifications
You must be signed in to change notification settings - Fork 26
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 run the example #210
Comments
Hi @TadielloM, we're in the process of updating and moving the documentation from the README (where is not very updated after the last refactoring) to the website. In particular, the instruction you followed were referring to the I recommend to follow the User Installation of the devel branch and run the cartpole example from there. Those setup instruction have been written recently and they're not bullet proof yet, let me know if you find any trouble. I will open a new issue to describe how to handle the ogre2 problem on bionic. |
Workaround for ogre2 described in #211. |
Hi @diegoferigo, at the end, I was able to run the code locally but not in the docker container. I didn't have |
Yes thanks, it's in my TODO list. |
@diegoferigo I can't run launch_cartpole.py too. I install gym-ignition stable channel as developer in virtual environment. My issue is nothing output in terminal after debug this line I got below snippet when I kill python script with |
@Reaper151 There's something strange in your setup, if you installed the stable channel as developer you should not have the Master up to today is quite old and I warmly recommend to use the nightly channel (it requires building Ignition Robotics from source). We're currently running long experiments (~15h) on a distributed setup and I can tell you it's very reliable (despite it's in the nightly channel). |
@diegoferigo Oh yes. I clone devel repo but I install stable developer. However, I'm building Ignition libraries. I'll get back to you when I'm done installation and test that demo again. |
If you keep having problems with the demo script, please enable debug messages uncommenting the following line and post the output
Note that rendering is disabled, if you want the GUI to open, uncomment:
|
Unfortunately, @diegoferigo I still can't run demo.
|
I just tried on my machine with last Can you write the precise sequence of commands you executed to 1) install the CMake project 2) Create and enable the virtual environment 3) Install the Python package? |
|
The steps seem correct. Does it segfault also if you execute line by line in an interactive session the following? If yes, which line? import gym_ignition_models
from gym_ignition.utils import scenario
from gym_ignition_environments import models
gazebo, world = scenario.init_gazebo_sim()
cartpole = models.cartpole.CartPole(world=world)
cartpole.get_joint("pivot").reset(position=0.5, velocity=2.0)
for _ in range(10):
gazebo.run()
print(cartpole.get_joint("pivot").position()) This is the simplest standalone code you can execute (I have few similar tutorials pending). Regarding the swig problem, I suspect that after step 2) you have Solution: do not install |
I probably do run CMake in gym-ignition build folder before built SWIG from sources which leads to SWIG incompatibiliy. Then I built swig from sources, ran CMake again, failed again, then I deleted whole build folder and ran CMake turns out it passed ( I wouldn't said it works because it's not lol)
Sincerely,
Wiwat Tulapornpipat
…On 18 Jun 2020 01:20 +0900, Diego Ferigo ***@***.***>, wrote:
The steps seem correct. Does it segfault also if you execute line by line in an interactive session the following? If yes, which line?
import gym_ignition_models
from gym_ignition.utils import scenario
from gym_ignition_environments import models
gazebo, world = scenario.init_gazebo_sim()
cartpole = models.cartpole.CartPole(world=world)
cartpole.get_joint("pivot").reset(position=0.5, velocity=2.0)
for _ in range(10):
gazebo.run()
print(cartpole.get_joint("pivot").position())
This is the simplest standalone code you can execute (I have few similar tutorials pending).
Regarding the swig problem, I suspect that after step 2) you have swig3 installed from apt, and after step 4) you also have swig4 installed from sources. For some reason the first one is detected, that on bionic it is too old. Did you perhaps run CMake in gym-ignition build folder before installing swig from sources? In that case, swig3 is detected and cached. Even if you install swig4 later, it won't get detected and the cached resources are used.
Solution: do not install swig from apt. I will update the install guide accordingly.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I fresh installed ignition-nightly and gym-ignition-nightly with steps below. (SPOILED: still not working)
|
I also tried docker demo but it's working too.
|
This error #210 (comment) seems
Ok great, this is more informative. Are you sure you sourced the colcon workspace before running the commands that failed? It seems not finding the variable Another attempt is:
Btw, the simple standalone code works. You see all 0.0 because the physics is not running, but all the other libraries are loaded. What puzzles me is the segfault of the cartpole example. Something else that I noticed is that you run cmake with sudo. Don't do it, it messes up the permissions. If you are on ubuntu you can substitute the commands (in a clean build folder with):
|
After I export 'IGN_GAZEBO_PHYSICS_ENGINE_PATH' it still failed to find physics plugin. BTW, I have gym-gazabo in my system too. I don't know whether this cause the issue or not. I'm going to build ignition-nightly again because of path environment issue. |
I believe that if you
This means that you also have Gazebo Classic installed, with all its dependencies that despite have been designed to coexist with Ignition Gazebo, it makes your setup quite peculiar. For these setup I typically advocate for docker-based solutions because it helps a lot on removing cross-talk with other projects. However, let's try to make it work without it and find what's the root cause. Often, without docker, cleaning properly a system is not straightforward and minor details that we cannot know are crucial. As I wrote above, I would recommend using the nightly installation in user mode, it reduces the steps. The drawback is that you no longer have access to the build folder, therefore swig 4 must be detected by default. |
I noticed that dependencies installation command for Bionic which you suggest has swig in it. So, SWIG4 installation procedure should be under Ignition-nightly procedure.
When I ran I went back to built gym-ignition-nightly as developer again and my physics path is fine but as I mention I'm so confused now. TT |
Yes, this is what I meant in #210 (comment). I will update the docs accordingly.
It's packaging burden, don't mind about names. When we upload packages to PyPI we do some renaming. Otherwise we couldn't use a single I'm confused as well, the simplest configuration to debug your setup problem is the following. Please do this from scratch otherwise we're going to loop forever:
After all of this, you should have in |
I used Synaptic with completely removal action with all of ignition and check with May I put ignition-nightly in this order |
This is something I didn't get from your setup. The python virtualenv is one thing that should remain standalone. A possible structure if you want a single folder is the following:
|
Finally, I got something make sense but I noticed there's
|
Ok we're on the right way. The output is finally correct. Let's try to solve now that double free that does not occur in any of our systems. Does it occur also if you run the minimal code of #210 (comment)? Nit: please use ``` for multiline code instead of quoting, your previous comment crosslinked a lot of issues and pr by mistake |
I got
This is debug from
Updated: I found this answer which exactly as my system.
|
Lucky case, debugging that would have been a pain. Did you validate it with the |
We had a similar ROS2 conflict problem (even if there was at configuration time) in #118 (comment) . |
@diegoferigo Yes, I have exact same results. I found that libdart6 depends on liboctomap1.8 for collision after I remove liboctomap1.8 instead of remove ros-melodic-octomap because ros-melodic-octomap is crucial in ros-melodic but this didn't work. So, I removed ros-melodic-octomap, installed Ignition library/ gym-ignition then reinstall ros-melodic and other packages. |
I'm glad you managed to solve it. Even though it works, every time you need to compile again the project, your setup will break again, and removing the octomap package every time could be an annoying process. Maybe you can find another workaround playing with few symlinks, |
Hi,
I was trying to run the example of the cartpole but when I tried to run it I get the following error:
standard_init_linux.go:211: exec user process caused "exec format error"
I've seen that could be some incompatibility with the architecture. However, I'm running a Ubuntu 18.04 x86_64 on an Intel core i7, is the example on docker using a different OS?
How can I try to fix it?
The text was updated successfully, but these errors were encountered: