Software Development Kit
Code Verison: 0.7
This code version introduces alot of extra commands that can be used to control MIPR. The idea behind this was to allow people to program MIPR using what ever tools they wanted. With this SDK all you need to do is to connect to MIPR via the HC-05, once connected you can use the commands detailed in the SDK documentation to make MIPR do things and to get readings from MIPR's sensors.
The GitHub repo contains the SDK documentation that details all commands that can be used in this mode. I have also included some example programs written in Python to help get you started. Although I have written the example programs in Python you can use what ever language you want such as Java, C++, C#, etc.
Some of the examples will use the Python Turtle class to draw how MIPR thinks it is moving. You will notice when running these scripts that the robot will think its moving in a certain direction however the actual direction could be totally different. This is because we're not using Odometry/Telemetry data in these examples, to have more accurate representation of the world we need to use both Odometry data and data from an IMU or compass. It's interesting to see how the robot views the space that it is in. In future updates we will improve the Odometry code and add a compass to the robot so we can get accurate direction information.
You can see one of the Python scripts below to see how easy it is to get up and running with this SDK;
When writing code for real time systems I would usually say not to use delays such as time.sleep() as the program will be non-responsive for that amount of time however, when writing these Python scripts it is fine to use these as we're requesting data from the robot at a relatively slow rate and in between updates we're just waiting for the next bit of data to act upon anyway. The delays are very important in this context because if we send or request data too quickly we will overload the buffer and data will be lost, remember that we're operating at 57600 baud which is 57600 bit per second or 7,200 KBytes per second which is very slow.