Git Product home page Git Product logo

Comments (3)

rizavelioglu avatar rizavelioglu commented on May 31, 2024

Hi SHITIANYU,

The agent in PID controller script does not avoid obstacles, actually. It just tries to follow the lane (a.k.a. Lane Following).

  • In Line#71:
    obs, reward, done, info = env.step(action)
    we send the action that the agent should take in the environment. What's that action? It is a list of size 2 (2 numbers) which refers to the left wheel velocity and the right wheel velocity.

  • In Line#69:
    action = wrapper.convert([speed, steering])
    we get the action, which is converted from the list [speed, steering] to [leftWheelVelocity, rightWheelVelocity]. Why is that? Because the Simulator accepts only the wheel velocities as action.

  • In Line#67:
    steering = k_p*distance_to_road_center + k_d*angle_from_straight_in_rads + k_i * sum(prev_angles)
    we see how steering is calculated with respect to PID parameters. These parameters are tuned manually, in other words they're chosen manually after trying bunch of different combinations.

All in all, the script is just trying to stay in the lane and to follow it, without avoiding obstacles.

from challenge-aido_rl-il.

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

Thanks for your reply! Yes, this is as same as my understanding, is it in the simulator, they implement the obstacle avoidance function? (I saw in the simulation it could avoid static obstacles) And the above script is trying to stay in the lane and to follow it, why the robot can move forward rather than just stand still in the middle of the lane?

from challenge-aido_rl-il.

rizavelioglu avatar rizavelioglu commented on May 31, 2024

I guess they don't do obstacle avoidance, they just check if the agent collided with an object or not (see the function proximity penalty at Line#1206). In case the agent collides with an object they apply a penalty to the reward, see function compute_reward at Line#1419

Maybe they have another script for doing obstacle avoidance, not that I know of. In that regard, you can contact the creators of the simulator on their Slack channel or by their GitHub repo

from challenge-aido_rl-il.

Related Issues (4)

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.