Code Monkey home page Code Monkey logo

Comments (6)

MNikdan avatar MNikdan commented on May 24, 2024 1

Hello.
I'm trying to visualize the predictions of DIM agent. I was able to do so by using the carnovel benchmark. But in the output videos, the car does not exactly follow the prediction.
Here's a sample of the generated outputs. As you can see in the video, the car is not following the red line.
dim.zip
Is there a constraint that prevents the car from getting out of lane?

Hello. Can you share some insight on how do you plot the red line the the dim.zip videos. I have tried all the ways to do it but for one or the other reason I can't. I am try to use autopilot at server side.

Hello. Sorry I closed the issue by mistake.
Something like this should work. Have you tried this?

import functools
from oatomobile.benchmarks.carnovel.benchmark import carnovel

agent_fn = functools.partial(
    AutopilotAgent,
    proximity_tlight_threshold=5.,
    proximity_vehicle_threshold=10.0,
    noise=0,
)

carnovel.evaluate(agent_fn, log_dir='log_dir/', subtasks_id='AbnormalTurns0-v0', monitor=True, render=False)

from oatomobile.

hzakerynia avatar hzakerynia commented on May 24, 2024

I have the same problem.

from oatomobile.

filangelos avatar filangelos commented on May 24, 2024

Hi @MNikdan and @hzakerynia,

There is no constraint that prevents the car from getting out of the lane!

The reason why you observe this behaviour is due to the way predictions are consumed by the SetPointAgent: There are a few key arguments in the initialization of the Agent that you can play with and observe their impact on how the agent behaves with respect to the predictions:

  • setpoint_index: This is the index of the point that the PID controller uses to control the steering and throttle/brake. All the points after this index can be ignored.
  • replan_every_steps: This specifies the frequency that the agent replans (e.g., you can think of that as MPC-like).

For example, by setting setpoint_index=5 and replan_every_steps=1 (the default values), the agent:

  1. generates a prediction with shape [40, 2],
  2. it keeps only the first [5, 2] (as specified by setpoint_index),
  3. it uses these points to calculate the target speed and the steering angle,
  4. it performs a single step in the environment,
  5. repeat...

If you look carefully at the videos you will see that the agent is really following the setpoint_index point at each timestep. An experiment I would recommend you try is setting replan_every_steps=35 (or something close to 40) and see how the agent does consume the whole prediction!

I hope that helps with your question. Let me know if there are any other related questions.

from oatomobile.

hzakerynia avatar hzakerynia commented on May 24, 2024

Hi
Thanks for your answer.
I used a dummy agent that predict a constant trajectory that goes north-east with default settings.
as it's shown in this gif.zip it won't follow the prediction until there is a road.
I still think the car doesn't follow predictions if it causes an accident and I think it's because of this part that gets the setpoints from carla.

from oatomobile.

filangelos avatar filangelos commented on May 24, 2024

Hi @hzakerynia,

Hmm, I think you are right! I hadn't thought that carla_map.get_waypoint(location) would have such an impact! The reason we were using it was that the official CARLA PID controller expects a carla.Waypoint instead of a carla.Location object and that was the easiest way to make the typecasting.

This may require a decent amount of refactoring and we should rerun the suite of experiments and update the numbers accordingly. Let me get back to you when I have this.

At least all the methods use the very same method so there is no bias towards any of the baselines. Nonetheless, that may mean that the final scores may need to be modified.

Anyway, thank you @hzakerynia for spotting that!

from oatomobile.

Ad4102 avatar Ad4102 commented on May 24, 2024

Hello.

I'm trying to visualize the predictions of DIM agent. I was able to do so by using the carnovel benchmark. But in the output videos, the car does not exactly follow the prediction.

Here's a sample of the generated outputs. As you can see in the video, the car is not following the red line.

dim.zip

Is there a constraint that prevents the car from getting out of lane?

Hello. Can you share some insight on how do you plot the red line the the dim.zip videos. I have tried all the ways to do it but for one or the other reason I can't. I am try to use autopilot at server side.

from oatomobile.

Related Issues (14)

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.