Coder Social home page Coder Social logo

Comments (4)

Palculator avatar Palculator commented on August 16, 2024

Seems like I forgot to update the docstring for that function, my bad. However, I recommend using the more powerful ai_set_script function which uses BeamNG.drive's ScriptAI for driving around. The main difference to _line is that, instead of position and speed, you define a line by a position and a target time, which also allows you to specify lines where the vehicle stops at a certain point — something not really possible with ai_set_line. There's an example of how to use ai_set_script here: https://github.com/BeamNG/BeamNGpy/blob/master/examples/ai_line.py

With api reference here: https://beamngpy.readthedocs.io/en/latest/api/beamngpy.html#beamngpy.vehicle.Vehicle.ai_set_script

from beamngpy.

tariqsameed avatar tariqsameed commented on August 16, 2024

Actually, I want to drive the vehicle between the polyline at a constant speed. It seems to me that ai_set_line will be the most appropriate solution in my case. I don't want to define the time to reach the destination point. I believe that it should be automatically handled by BeamNG itself. if possible, please update the documentation of ai_set_line so I can run both examples of ai_set_script. and ai_set_line What are the changes you have made it ai_set_line.

Is there anything in BeamNG that leaves the car in the free state. I mean, let suppose the car is driving at 35 kph with the throttle, braking and suddenly I want to leave the paddles and steering to see where the car can go without the interference of human being.

from beamngpy.

Palculator avatar Palculator commented on August 16, 2024

The documentation is already updated: https://beamngpy.readthedocs.io/en/latest/api/beamngpy.html#beamngpy.vehicle.Vehicle.ai_set_line
There is also the old version of the example above: https://github.com/BeamNG/BeamNGpy/blob/c6215295a942f00388062d8525f20e7fc59159d1/examples/ai_line.py

To clear your vehicle inputs, you can simply send 0 for the respective values: vehicle.control(throttle=0, steering=0, brake=0, parkingbrake=0)

from beamngpy.

lsm2842035890 avatar lsm2842035890 commented on August 16, 2024

72{17T04ULZ4NS5)DN ASCP
2 NVZ2ILPU68XY5JH 5F4YD
hello friends~I loaded the gridsmall map and paved a simple road. I want the vehicle to run according to my trajectory. Why does the vehicle not move?

from beamngpy.

Related Issues (20)

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.