Closed NextSim closed 6 years ago
1) By "autonomous driving," do you mean API control? If so, the answer is yes. Via python, you can use the CarClient.setApiControl() member to switch between manual (false) and API (true) driving modes.
2) If you figure that out, you've made a million dollars :). To my knowledge, AirSim doesn't have any models built in, so that part is up to you. If you're looking to get started, you may be interested in checking out the Autonomous Driving Cookbook, which has some simple examples using AirSim and deep learning to drive the car autonomously.
3) Not sure about this one. @sytelus might know.
Thanks.
Are there any details on the format of the API calls? I know there is the list of common API calls, but I haven't seen anything about the arguments it takes
Not sure about formal documentation, but you can look through AirsimClient.py to see what methods are available. For full examples, check out HelloCar.py.
Thanks.
I'm using c# but am struggling getting the API working. I'm successfully connecting, my issue is sending the api data in the correct format.
I'm trying to use the serializer here: https://github.com/msgpack/msgpack-cli
I created two classes for the data to enable the api and set the car control
I tried monitoring the data sent from the hellocar example in wireshark (that successfully enables the api and can control the car) and the data doesn't seem close.
I don't understand how to serialize the data properly into the MessagePack format.
public class enableApiHelper
{
public String title { get; set; }
public bool enable { get; set; }
}
Then serialize the enable api data
var stream = new MemoryStream();
enableApiHelper apiEnable = new enableApiHelper
{
title = "enableApiControl",
enable = true
};
// call Serialize/Deserialize, that's all.
var serializer = MessagePackSerializer.Get<enableApiHelper>();
serializer.Pack(stream, apiEnable);
stream.Position = 0;
byte[] apiEnableBytes = stream.ToArray();
and send the byte array over tcp.
Which doesn't work. It looks like the data is correct, but there are a few bytes at the beginning and end that are different than the helloCar example.
Any help you can provide is greatly appreciated.. I'm really spinning my wheels.
I was able to figure out how to properly create the classes so that they serialize correctly.
I don't understand where the '0' and '1' come from though.
In JSON
[ 0, 1, "enableApiControl", [ true ] ]
Please continue discussion here: https://github.com/Microsoft/AirSim/issues/946
I'm working on a driving simulator that would connect AirSim to a power steering system (not a steering wheel joystick).
I have a few questions about AirSim:
Can the car change between manual driving and autonomous driving on demand? Or does this have to be set up to one or the other before it is launched?
How does autonomous driving work? Is a path predefined and the car has to start at a defined location? Can a destination be given and the car finds a route there?
Is there are support for force feedback for the steering when going over curbs or bumpy roads?