Please select Into the mobile phone version | Continue to access the computer ver.
Unit tests & Simulator
279 1 3-25 09:57
Uploading and Loding Picture ...(0/1)
o(^-^)o
Tiry
lvl.1
United States
Offline

Hi,

I am new to robotic and to Robomaster EP, please bear with me if I am asking silly questions.

I am still discovering the technology, but I already have a few questions and would be grateful for any feedback you could provide.

I am able to use the Python SDK to control the RoboMaster EP Core: Chassis, Arm, and Gripper.

However, in order to go further witting code, I would like to know if there are good practices for writing unit tests and more generally testing my code.
To be clear, I know how to write python test cases, but what I do not know is how to efficiently test with the RoboMaster SDK.
My understanding is that I would need some kind of "simulator" so I can test my code without interactively running with a real robot.

When researching this topic, the main hit seems to be: ROS + gazebo.
I found some examples of RoboMaster related drivers for ROS as well as some modelization files (stl and urdf): but all I found seems more related to the RoboMaster competition than the RoboMaster EP hardware (i.e. RoboRTS)

Thanks for any help or advice you can provide!

Tiry

3-25 09:57
Use props
BGA
First Officer
United States
Offline

If you just want to test your code and you do not care about correctness in the SDK itself (which might very well be the case), I would simply mock all the calls to the SDK. This might help: https://docs.python.org/3/library/unittest.mock.html
3-25 10:10
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules