You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the current API between DonkeyCar and MM1 is too weak to support all fantasitic MM1 features.
Why not using a similar API like GYM part and remote DCsimulator ?
Instead of exchanging throttle and steering only, exchange simple JSON data in both directions.
The API may be extended very easy to support additional features of MM1.
this is the key part of action :-)
if(len(datastr) >= 10):
steering_val = steering.value
throttle_val = throttle.value
try:
steering_val = int(datastr[:4])
throttle_val = int(datastr[-4:])
this must be replaced by simple json encode/decode feature... at micropython and mm1-part
while True:
json_string = sio.readline()
try:
data = json.loads(json_string)
if enable_stdio == 1:
print(data["serial"],data["gyro"],data["accel"],data["magnetic"],data["temperature"],data["vshunt"],data["vbus"],data["current"],data["nmea"])
except:
print("ERROR:"+str(err)+" json decode error !!!")
err=err+1
Hello again,
the current API between DonkeyCar and MM1 is too weak to support all fantasitic MM1 features.
Why not using a similar API like GYM part and remote DCsimulator ?
Instead of exchanging throttle and steering only, exchange simple JSON data in both directions.
The API may be extended very easy to support additional features of MM1.
PoC exchange json :: https://github.com/mockbot/SerialJsonGW/blob/master/MM1JsonAgent.py
TODO: more reliable serial communication in both directions.
The text was updated successfully, but these errors were encountered: