Giter Site home page Giter Site logo

Comments (12)

praveen-palanisamy avatar praveen-palanisamy commented on May 29, 2024

Oh! Is that all the error message you get?
That's strange and too short to debug. It looks like some runtime issue.
Which CARLA server version are you using?

from macad-agents.

SHITIANYU-hue avatar SHITIANYU-hue commented on May 29, 2024

I am using this version 'carla==0.9.4' actually, I follow the installation instruction from the macad_gym environment

from macad-agents.

SHITIANYU-hue avatar SHITIANYU-hue commented on May 29, 2024

I can run this script successfully:
https://github.com/praveen-palanisamy/macad-gym/blob/master/examples/basic_agent.py

So I think my Carla version should be correct.

from macad-agents.

praveen-palanisamy avatar praveen-palanisamy commented on May 29, 2024

Okay. Let me try to reproduce your issue but,

free(): invalid pointer
Aborted (core dumped)

is too little information to understand what's going wrong. Do you have any insight or can you run it with a debugger (pdb/ gdb) and report with a verbose log?

from macad-agents.

SHITIANYU-hue avatar SHITIANYU-hue commented on May 29, 2024

I just tried in debug mode, but still cannot find a detailed log. According to this discussion,
https://stackoverflow.com/questions/56346569/free-invalid-pointer-aborted-core-dumped

Probably it's the problem of the macad-gym package?

from macad-agents.

praveen-palanisamy avatar praveen-palanisamy commented on May 29, 2024

That discussion in that stackoverflow link is on interoperability of PyTorch and Open3D.
The macad-gym package doesn't use either of the packages.
The cause is still not identified. A PyTorch dev thought it may be with the incompatible CXX ABIs but it wasn't confirmed.

A stack trace or log from your system when it occurs is the way I can see how we can look deeper into this.

from macad-agents.

SHITIANYU-hue avatar SHITIANYU-hue commented on May 29, 2024

Hello, thanks for your reply! Could you run the baseline agent successfully on your computer?

from macad-agents.

praveen-palanisamy avatar praveen-palanisamy commented on May 29, 2024

Yes!

Based on a quick debug, I think, I have found a hint at what's going wrong. It's likely with the import carla statement.
Can you try with a source install (easy_install --user carla-0.9.4-py3.x-*.eg)of the carla python package from carla/PythonAPI?

from macad-agents.

SHITIANYU-hue avatar SHITIANYU-hue commented on May 29, 2024

Sure, I tried it on my computer, now it can launch the Carla simulator. But it still has new errors:

image

from macad-agents.

praveen-palanisamy avatar praveen-palanisamy commented on May 29, 2024

Glad that the runtime issues is resolved for you!

This error is due to a minor change in the macad-gym library.
You can change this line:

vehicle_dict[actor_id] = env.actors[actor_id]

to: vehicle_dict[actor_id] = env._actors[actor_i]

(Just adding an underscore before actors)

from macad-agents.

SHITIANYU-hue avatar SHITIANYU-hue commented on May 29, 2024

Thanks, I will try it. Besides, how can I run the code without a monitor?

from macad-agents.

praveen-palanisamy avatar praveen-palanisamy commented on May 29, 2024

For running without display/monitor, just the CARLA server needs to be launched in headless mode.
The simplest way is to set the environment variable: SDL_VIDEODRIVER=offscreen. This may not work under all of the systems and configuration. But it's the best first try.

A sure-shot but more involved way is to set-up virtual GL and XVFB (X Virtual Frame Buffers) and use a dedicated Xorg X server to run in headless mode. If the necessary system packages are installed, MACAD-Gym will automatically launch the CARLA server in headless mode based if render is set to false in the config or when running with multiple GPUs and mutiple sim environments

The containerized version will take care of this automatically. If you are running directly on the host, you may have to setup the system level packages yourself.

from macad-agents.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.