Please select Into the mobile phone version | Continue to access the computer ver.
Robomaster EP SDK Funktion overview
177 5 4-21 22:49
Uploading and Loding Picture ...(0/1)
o(^-^)o
Spookymike
First Officer
Germany
Offline

Hi there,

i´m learning about my new Robomaster EP and Python programming, that i am new to.
I tried to read throug the modules and examples provided with downloading the SDK.
This is all very hard to understand and to figure out what you can use and how to implement.

Those examples provided are pretty basic.

Browsing throug the block programming in the Robomaster App there should be a lot
more funktions to work with. As i understand, every code block represents a funktion or
a method that should also be found in the SDK.

Does anyone have done some sort of reference of all the classes, functions, methods and modules
that explane how to use them, like what parameters to input in the call?

For example like this:
ep_chassis.drive_speed(x=x_val, y=0, z=0, timeout=5)

I know there is a pdf called : RoboMaster EP Programming Guide V1.0
But this explanes mostly all the blocks functions
There is a explanation what those blocks are named within Python API
but most of these i can´t find in the SDK.

Hope someone has what i am looking for :-)

Regards


4-21 22:49
Use props
BGA
Captain
United States
Offline

I guess you are mixing 2 different things. SDK usually refers to the external SDK where you write a program in a computer that is then able to control the robot. Everything else you describe is the internal development environment of the robot and that does indeed have a 1:1 mapping between the python API and the blocks in the visual development IDE.
4-22 11:12
Use props
Spookymike
First Officer
Germany
Offline

Sorry i don´t get it
I clicked together some blocks in the R-App just to see the App internal Pyhon conversion.
But nothing in this code i can find anywhere in the modules of the Python SDK :-(

    robot_ctrl.set_mode(rm_define.robot_mode_free)
    chassis_ctrl.move_with_speed(0.5,0,0)
    led_ctrl.set_flash(rm_define.armor_all, 2)
    led_ctrl.set_bottom_led(rm_define.armor_bottom_all, 69, 215, 255, rm_define.effect_always_on)
    led_ctrl.set_top_led(rm_define.armor_top_all, 69, 215, 255, rm_define.effect_always_on)
    led_ctrl.set_single_led(rm_define.armor_top_all, 1, rm_define.effect_always_on)
    led_ctrl.turn_off(rm_define.armor_all)
    led_ctrl.gun_led_on()
    chassis_ctrl.set_pwm_value(rm_define.pwm_all, 7.5)
    chassis_ctrl.enable_stick_overlay()
    chassis_ctrl.set_follow_gimbal_offset(0)
    chassis_ctrl.set_trans_speed(0.5)
    chassis_ctrl.set_rotate_speed(30)
    chassis_ctrl.set_wheel_speed(100,100,100,100)
    chassis_ctrl.move(0)
    chassis_ctrl.move_with_time(0,1)
    chassis_ctrl.move_with_distance(0,1)
    chassis_ctrl.move_degree_with_speed(0.5,0)
    chassis_ctrl.rotate(rm_define.clockwise)
    chassis_ctrl.rotate_with_time(rm_define.clockwise, 1)
    chassis_ctrl.rotate_with_degree(rm_define.clockwise,0)
    chassis_ctrl.rotate_with_speed(rm_define.clockwise,30)
    chassis_ctrl.move_and_rotate(0, rm_define.clockwise)
    chassis_ctrl.move_with_speed(0.5,0.5,30)
    chassis_ctrl.stop()
    gimbal_ctrl.enable_stick_overlay()
    gimbal_ctrl.set_follow_chassis_offset(0)
    gimbal_ctrl.set_rotate_speed(30)
    gimbal_ctrl.recenter()
    gimbal_ctrl.rotate(rm_define.gimbal_up)
    gimbal_ctrl.rotate_with_degree(rm_define.gimbal_up,0)
    gimbal_ctrl.yaw_ctrl(0)
    gimbal_ctrl.angle_ctrl(0, 0)
    gimbal_ctrl.rotate_with_speed(30,30)
    gun_ctrl.set_fire_count(1)
    gun_ctrl.fire_once()
    gun_ctrl.fire_continuous()
    gun_ctrl.stop()
    ir_blaster_ctrl.set_fire_count(1)
    ir_blaster_ctrl.fire_once()
    ir_blaster_ctrl.fire_continuous()
    ir_blaster_ctrl.stop()
    vision_ctrl.enable_detection(rm_define.vision_detection_marker)
    vision_ctrl.enable_detection(rm_define.vision_detection_line)
    media_ctrl.enable_sound_recognition(rm_define.sound_detection_applause)
    vision_ctrl.set_marker_detection_distance(1)
    vision_ctrl.marker_detection_color_set(rm_define.marker_detection_color_red)
    vision_ctrl.line_follow_color_set(rm_define.line_follow_color_blue)
    media_ctrl.exposure_value_update(rm_define.exposure_value_large)
    vision_ctrl.detect_marker_and_aim(rm_define.marker_trans_red_heart)
    armor_ctrl.set_hit_sensitivity(5)
    armor_ctrl.cond_wait(rm_define.cond_ir_hit_detection)
    media_ctrl.play_sound(rm_define.media_sound_attacked)
    media_ctrl.play_sound(rm_define.media_sound_attacked,wait_for_complete_flag=True)
    media_ctrl.play_sound(rm_define.media_custom_audio_undefined)
    media_ctrl.capture()
    media_ctrl.record(1)
4-23 07:06
Use props
BGA
Captain
United States
Offline

Spookymike Posted at 4-23 07:06
Sorry i don´t get it
I clicked together some blocks in the R-App just to see the App internal Pyhon conversion.
But nothing in this code i can find anywhere in the modules of the Python SDK :-(

That is what I said, the Python SDK is different from the internal python coding environment, so what you are seeing is expected.
4-25 04:40
Use props
Spookymike
First Officer
Germany
Offline

OK, as i understand using the robomaster APP and leanring the EP Programming guide is absolute useless if i want to focus on leanring how to programm the EP external inPython and get used to the python language :-(
So all i can do is trying to read the python SDK files and learning by mistakes. So sad here in germany there is no communitiy of technerds. I tried talking to some collegues of mine from the software department, but really no one ever heard about the Robotmaster, no tech neards nearby ;-)
So i try to do small steps by step!
Thanks
4-26 10:11
Use props
BGA
Captain
United States
Offline

Spookymike Posted at 4-26 10:11
OK, as i understand using the robomaster APP and leanring the EP Programming guide is absolute useless if i want to focus on leanring how to programm the EP external inPython and get used to the python language :-(
So all i can do is trying to read the python SDK files and learning by mistakes. So sad here in germany there is no communitiy of technerds. I tried talking to some collegues of mine from the software department, but really no one ever heard about the Robotmaster, no tech neards nearby ;-)
So i try to do small steps by step!

The external Python SDK is documented here: https://robomaster-dev.readthedocs.io/en/latest/
4-26 11:28
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules