dji RoboMaster EP Programming Manual Download Page 1

 

 

 

   

 

Summary of Contents for RoboMaster EP

Page 1: ......

Page 2: ...1 ...

Page 3: ...this resource helpful to improving your programming skills making the most of each block and learning new ways to win The RoboMaster EP programming lab offers five block types Block Type Description Block Example Settings Set parameters such as speed frequency quantity and more Execution Control RoboMaster EP to execute specified commands Event Main function will pop out and begin to run programs ...

Page 4: ...are not placed within the Start area they will not be executed For example in the program shown below the EP will not be able to take a photo Python API Function start Type Main function 1 Objective Sets the travel mode Chassis Lead Mode The gimbal follows the chassis to rotate along the yaw axis Gimbal Lead Mode The chassis follows the gimbal to rotate along the yaw axis Free Mode The gimbal and ...

Page 5: ... the chassis and that the angle between the gimbal and the chassis front is zero when chassis motion stops Note 1 Chassis Lead Mode is the robot s default travel mode 2 In Chassis Lead Mode if the chassis is not rotating the gimbal will not be able to rotate left or right on its own Rotate together In Gimbal Lead Mode you will only set parameters for the gimbal When the gimbal is rotating along th...

Page 6: ...s will not be able to rotate left or right on its own Rotate contra directionally In Free Mode the gimbal and the chassis rotate in opposite directions In this mode you will need to check whether the gimbal and the chassis are interfering with each other s motion Note ...

Page 7: ...ot set_mode mode_enum Parameters mode_enum enum rm_define robot_mode_gimbal_follow rm_define robot_mode_chassis_follow rm_define robot_mode_free 1 Objective Starts pauses or stops the timer 2 Type Execution block 3 Example Time a rotation This measures the time it takes the chassis to complete one full rotation You can check details using the FPV window ...

Page 8: ...urement from this time when it starts again Refer to the example below in which t1 2 and t2 5 2 Select Stop to stop the timing process The previously recorded time will be deleted and the timer will begin measurement from zero when it starts again You can refer to the example below in which t1 2 and t2 0 ...

Page 9: ...er magnifications to support visual recognition over longer distances enabling the robot to focus on unclear objects more accurately 2 Type Execution block 3 Example Enlarge camera frame Place a Vision Marker 10 meters in front of the robot s gimbal and set the camera magnification to 4 the robot will now be able to accurately recognize the Vision Marker at this distance ...

Page 10: ...9 Before running the enlarge camera frame program After enlarging the camera frame ...

Page 11: ... Obtains the total time elapsed from when the timer first started to the current time in seconds 2 Type Information block variable type 3 Example Time a rotation This uses variables to measure the time it takes the chassis to complete one full rotation You can check details using the FPV window ...

Page 12: ...e time_stamp float 1 Objective Obtains the program running time in seconds 2 Type Information block variable type 3 Example Calculate program runtime This obtains the program running time using variables You can check specific details using the FPV window ...

Page 13: ...year month day hour minute and second 2 Type Information block variable type 3 Example Compare time values If the number of the current month is larger than the number of the current day the robot will nod its head if the number of the current month is less than or equal to the number of the current day the robot will shake its head ...

Page 14: ...fine localtime_minute rm_define localtime_second Return value time int 1 Objective Indicates the total time elapsed from when the robot started running up to the current time in seconds 2 Type Information block variable type 3 Example Calculate running time This measures the total time elapsed from when the robot most recently started running up to the current hour minute and second ...

Page 15: ...a break when program runtime reaches one hour i e when runTime_hour 1 Note 1 The start time refers to the time when the robot is powered on 2 If the robot restarts after a power failure it will recount the running time Python API Function tools get_unixtime Return value time float ...

Page 16: ... to flash red four times per second when reversing Python API Function led_ctrl set_flash armor_enum frequency Parameters armor_enum enum rm_define armor_all rm_define armor_bottom_front rm_define armor_bottom_back rm_define armor_bottom_left rm_define armor_bottom_right rm_define armor_top_left rm_define armor_top_right frequency int 1 10 I ...

Page 17: ... will set the robot to switch off all LEDs on the chassis for one second and then flash all LED colors in sequence Python API Function led_ctrl set_bottom_led armor_enum r g b led_effect_enum Parameters armor_enum enum rm_define armor_bottom_all rm_define armor_bottom_front rm_define armor_bottom_back rm_define armor_bottom_left rm_define armor_bottom_right r int 0 255 g int 0 255 b int 0 255 led_...

Page 18: ...lse LED will flicker Blink LED will blink at a specified frequency Scrolling Eight LEDs arranged in a circle will light up in clockwise direction 2 Type Execution block 3 Example Show off gimbal LED effects This will set the robot to display all five gimbal LED effects in sequence Python API Function led_ctrl set_top_led armor_enum r g b led_effect_enum Parameters armor_enum enum ...

Page 19: ...ct_flash rm_define effect_marquee 1 Objective Sets the flash sequence for the gimbal LEDs eight LEDs are located on each side of the gimbal and can be controlled independently 2 Type Execution block 3 Example Switch on a single light This will set the robot to switch off all the gimbal LEDs switch on the odd numbered LEDs in ascending order and then switch off all LEDs The figure below shows a cou...

Page 20: ...ll rm_define armor_top_left rm_define armor_top_right index int list 1 8 led_effect_enum enum rm_define effect_always_on rm_define effect_always_off 1 Objective Switches off designated LEDs 2 Type Execution block 3 Example Configure signal light This will set the robot to switch on LEDs on the right side of the gimbal before turning right after the turn is complete it will switch the LED off ...

Page 21: ...back rm_define armor_bottom_left rm_define armor_bottom_right rm_define armor_top_left rm_define armor_top_right 1 Objective Controls the trajectory light 2 Type Execution block 3 Example Launch the trajectory light This will set the robot to switch on the trajectory light when firing shots Python API Function led_ctrl gun_led_on led_ctrl gun_led_off ...

Page 22: ...ied time period The basic frequency for the PWM port is 50Hz 2 Type Settings block 3 Examples Turn LED on off Rotate navigation gear Turn LED on off This enables you to connect an LED to any PWM port and then turn the LED on or off Rotate navigation gear This enables you to connect an external navigation gear to any PWM port and then control its rotation I ...

Page 23: ...sponding to an LED s lowest brightness and 100 to its highest brightness 4 For navigation gears the PWM output rate ranges from 2 5 to 12 5 Because most navigation gears have a control impulse frequency of 50Hz and a control period of 20 ms and because the high level pulse width of outputs with an adjustable angle range of 90 to 90 ranges from 0 5ms to 2 5ms control of the navigation gear s duty r...

Page 24: ...rm_define pwm3 rm_define pwm4 rm_define pwm5 rm_define pwm6 output_percent int 0 100 1 Objective Enables disables the chassis accelerator 2 Type Settings block 3 Example Operate chassis accelerator When the chassis is moving automatically this will enable you to use the joystick to manually rotate or translate the chassis and increase its translation speed ...

Page 25: ...from 1 to 1 In the image below the virtual joystick shown on the FPV interface has reached its upper limit meaning its sensitivity value is 1 3 When the chassis accelerator is enabled the programmed speed will be added to the current speed As the image below shows the chassis translates at a programmed speed of 0 5 m s When the joystick is pushed to its limit and the chassis accelerator is enabled...

Page 26: ..._overlay 1 Objective In Gimbal Lead Mode maintains a specific angle for the chassis relative to the movement of the gimbal 2 Type Settings block 3 Example Gimbal Lead Mode The angle between the chassis and the movement of the gimbal will increase at first then eventually fall to zero ...

Page 27: ...ee Mode 2 A zero degree angle between the chassis and the movement of the gimbal means that the chassis and the gimbal are rotating in the same direction along the yaw axis Python API Function chassis_ctrl set_follow_gimbal_offset degree Parameters degree int 180 180 ...

Page 28: ...s to return to the starting point Note Please ensure there are no obstacles in the robot s intended path before setting the chassis to a high translation speed Python API Function chassis_ctrl set_trans_speed speed Parameters speed float 0 3 5 m s 1 Objective Sets the default rotation speed of the chassis to 30 s the chassis will rotate faster when set to a higher rotation speed value 2 Type Setti...

Page 29: ...s each wheel s rotation speed to be set independently only valid combinations of rotation direction and speed will take effect 2 Type Execution block 3 Examples Reversing in an S pattern Translating in a circle Reversing in an S pattern This will control the chassis to move backwards along an S shaped path ...

Page 30: ...l rotation directions and speeds push the robot manually to move it in the desired pattern and observe the rotational direction of each wheel the rotation speed s value should be positive for wheels rotating forward and negative for wheels rotating backward For example When the robot translates to the right the front left wheel and rear right wheel will rotate forward so their rotation speed value...

Page 31: ...ero When the robot rotates to the left the front right wheel and the rear right wheel will rotate forward so their rotation speed values should be positive while the front left wheel and the rear left wheel will rotate backwards so their rotation speed values should be negative Python API Function chassis_ctrl set_wheel_speed lf_speed rf_speed lr_speed rr_speed Parameters lf_speed int 1000 1000 rp...

Page 32: ...ously translate in a specified direction until the robot receives a set chassis to stop moving wait 1 s or other command that controls it to stop Python API Function chassis_ctrl move degree Parameters degree int 180 180 1 Objective Sets the duration of time the chassis will translate in a specified direction 2 Type Execution block 3 Example Translate in an X pattern This will control the robot to...

Page 33: ...gree int 180 180 time float 0 20 s 1 Objective Sets the distance the chassis will translate in a specified direction 2 Type Execution block 3 Example Translate in a cross pattern This will control the robot to translate forward backward left and right in a cross shaped sequence ...

Page 34: ...t 0 5 m 1 Objective Sets the chassis to translate in a specified direction and at a specified speed 2 Type Execution block 3 Example Return to starting position This sets the chassis to translate forward and to the right at 1 m s then translate backward and to the left at 0 5 m s to return to the original position ...

Page 35: ...speed degree Parameters speed float 0 3 5 m s degree int 180 180 1 Objective Sets the chassis to rotate in a specified direction 2 Type Execution block 3 Example Rotate at variable speed This will control the chassis to rotate increasingly quickly to the right ...

Page 36: ...ly in a specified direction until it receives a set chassis to stop moving wait 1 s or other command that causes it to stop Python API Function chassis_ctrl rotate direction_enum Parameters direction_enum enum rm_define clockwise rm_define anticlockwise 1 Objective Sets the duration the chassis will rotate in a specified direction 2 Type Execution block 3 Example Cross rotate the gimbal and chassi...

Page 37: ...ets the angle and direction of chassis rotation 2 Type Execution block 3 Example Translate continuously back and forth This sets the EP to translate back and forth continuously with the gimbal directed outward Note This block is not available in Gimbal Lead Mode Python API Function chassis_ctrl rotate_with_degree direction_enum degree Parameters direction_enum enum rm_define clockwise rm_define an...

Page 38: ...his sets the robot to translate in a figure 8 Note The set the chassis to rotate block is not available in Gimbal Lead Mode however the set the chassis to translate block is supported in Gimbal Lead Mode Python API Function chassis_ctrl move_and_rotate degree direction Parameters degree int 180 180 direction_enum enum rm_define clockwise rm_define anticlockwise ...

Page 39: ...e central point Python API Function chassis_ctrl move_with_speed speed_x speed_y speed_rotation Parameters speed_x float 0 3 5 m s speed_y float 0 3 5 m s speed_rotation int 600 600 s 1 Objective Stops all chassis movements 2 Type Execution block 3 Example Rotate chassis right This sets the chassis to translate forward for 2 seconds at default speed then turn right and stop moving ...

Page 40: ...pitch roll axes based on the chassis location when the robot begins running 2 Type Information block variable type 3 Example Signal turn This sets the yellow LED indicator to come on when you manually control the robot to turn left and sets the blue LED indicator to come on when you manually control the robot to turn right ...

Page 41: ... the chassis along the yaw axis results in left and right rotation 2 Rotating the chassis along the pitch axis results in up and down rotation 3 Rotating the chassis along the roll axis will cause the robot to turn over ...

Page 42: ...e float 1 Objective Obtains the current location coordinates and orientation of the chassis 2 Type Information block variable type 3 Example Obtain current position information This enables you to check numerical data for the current chassis position by manually pushing the robot back and forth or turning it left and right You can observe numerical changes using the FPV interface ...

Page 43: ...ion_enum enum rm_define chassis_forward rm_define chassis_translation rm_define chassis_rotate Return value position float 1 Objective Runs the program for the corresponding block when the chassis hits an obstacle while driving 2 Type Event block 3 Example Self defend This enables the self defense mechanism to activate when the chassis impacts an obstacle causing the robot to retreat and stop runn...

Page 44: ... driving otherwise returns False 2 Type Boolean block 3 Example Emit danger warning If the chassis impacts an obstacle while the robot is being controlled through the FPV interface the hit sound will play and all red LED indicators for the chassis and gimbal will blink in all other scenarios these indicators will remain on in a steadystate ...

Page 45: ...44 Python API Function chassis_ctrl is_impact Return value impact_status bool ...

Page 46: ...he FPV interface to manually control the gimbal s rotation for aiming and firing while the robot s chassis continuously rotates left and right Python API Function gimbal_ctrl enable_stick_overlay gimbal_ctrl disable_stick_overlay 1 Objective Allows the gimbal to maintain a specific angle according to the chassis movement in Chassis Lead Mode I ...

Page 47: ...the gimbal and chassis are translating in the same direction along the yaw axis 3 This is an alternative way to control the gimbal s to left and right rotation Python API Function gimbal_ctrl set_follow_chassis_offset degree Parameters degree int 180 180 1 Objective Sets default gimbal rotation speed to 30 s the higher the value the quicker the rotation 2 Type Settings block 3 Example Rotate with ...

Page 48: ...riginal position along the pitch axis and yaw axis Stop The gimbal will stop translating but can still be controlled Sleep The gimbal will go to sleep Wake The gimbal will power on again 2 Type Execution block 3 Example Wake gimbal up Hovering Wake gimbal up In Sleep Mode there is no power from the motor so the gimbal can be translated freely by hand When the gimbal wakes up it will power on again...

Page 49: ...r is not available Hovering This will set the gimbal to rotate upward for 0 5 second then pause for 2 seconds It will then rotate downward for 0 5 second then return to its original position and stop translating Python API Function gimbal_ctrl recenter ...

Page 50: ...te directions Note 1 In Chassis Lead Mode only the set gimbal to rotate up down block is available the set gimbal to rotate left right block is not available 2 This block sets the gimbal to constantly rotate to a specific direction until it receives a command such as set gimbal to stop wait 1 s and so on Python API Function gimbal_ctrl rotate direction_enum Parameters direction_enum enum ...

Page 51: ... the gimbal to rotate left or right with the selected sound effect Note In Chassis Lead Mode only the set gimbal to rotate up down in 0 block is available the set gimbal to rotate left right in 0 block is not available Python API Function gimbal_ctrl rotate_with_degree direction_enum degree Parameters direction_enum enum rm_define gimbal_up rm_define gimbal_down rm_define gimbal_left rm_define gim...

Page 52: ...ad mode this block is not available 2 The gimbal will rotate left and right along the yaw axis and up and down along the pitch axis Python API Function gimbal_ctrl yaw_ctrl degree Parameters degree int 250 250 1 Objective Sets the gimbal to rotate along pitch axis to a designated position 2 Type Execution block 3 Examples Simulate the power on process Follow arrow markers Simulate power on process...

Page 53: ...52 Follow arrow markers ...

Page 54: ...itch axis and left and right along the yaw axis Python API Function gimbal_ctrl pitch_ctrl degree Parameters degree int 20 35 1 Objective Sets the gimbal to rotate at a specific angle at a designated position 2 Type Execution block 3 Example Tiered firing ...

Page 55: ... to 0 block is not 2 set gimbal to rotate up in 0 refers to the position relative to the gimbal s current position 3 set gimbal to rotate along yaw axis to 0 set gimbal to rotate along pitch axis to 0 set gimbal to rotate along yaw axis to 0 and pitch axis to 0 refers to the absolute position based on the chassis current location Python API ...

Page 56: ...ple Flexible neck rotation Note The value of the rotation speed represents the gimbal s rotation direction At the yaw axis a positive value indicates right rotation and a negative value indicates left rotation At the pitch axis a positive value indicates upward rotation and a negative value indicates downward rotation Python API Function gimbal_ctrl rotate_with_speed yaw_speed pitch_speed Paramete...

Page 57: ...nslate in the gimbal s direction This will set the gimbal to aim towards a specific direction The robot will translate towards the specified direction for one second after the gimbal is pressed Python API Function gimbal_ctrl get_axis_angle axis_enum Parameters axis_enum enum rm_define gimbal_axis_yaw rm_define gimbal_axis_pitch Return value degree int ...

Page 58: ...k 3 Example Fire 6 beads in sequence Note A maximum of 8 beads can be fired each time Python API Function gun_ctrl set_fire_count count Parameters count int 1 8 1 Objective Sets the Blaster to single shot mode 2 Type Execution block Blocking block 3 Example Fire single shot I ...

Page 59: ...ective Sets the Blaster to full auto mode 2 Type Execution block Non blocking block 3 Example Fire strafe shots Note 1 The default firing frequency is one bead per second 2 The Full Auto block is a non blocking block meaning the robot will continuously fire beads until it receives the Stop the Blaster from Firing command or the program ends 3 The difference between Single Shot and Full Auto is as ...

Page 60: ...ype Execution block 3 Example Stop firing Note Because the single shot is a blocking block the stop firing block does not apply to it stop firing only has limitations on full auto Python API Function gun_ctrl stop 1 Description Set the infrared beam shooting frequency i e number of infrared beam shot per second 2 Type Setting 3 Example shoot infrared beam 8 consecutive times ...

Page 61: ...rations are not affected by system settings For example in Current setting Control infrared beam is chosen for the blast type However during programming the gel bead module is used so gel beads will still be launched when the program runs Designs different from the system setting outside the laboratory will not take effect 1 Description Control blaster to shoot infrared beam for only once 2 Type E...

Page 62: ...ed shooting The gimbal rotates around the yaw axis and the blaster consecutively shoots the infrared beam Note 1 The default frequency is one shot per second 2 The module Shoot Infrared Beam Consecutively is a non blocking module that is it will continue to shoot until it encounters the Stop Shooting Infrared Beam command or until the program ends 3 The difference between the modules Shoot Infrare...

Page 63: ...p shooting infrared beam 2 Type Execution 3 Example Stop shooting Stop after the blaster shoots infrared beam consecutively for five seconds Note 1 As Shoot Infrared Beams for a Single Time is a blocking module the Stop Shooting Infrared Beam command has no effect on it 2 The Stop Shooting Infrared Beam command only restricts the module Shoot Infrared Beam Consecutively ...

Page 64: ... grip Place a soft object onto the gripper and continuously increase the grip force It can be observed through the FPV window that the shape change of the gripped object becomes more and more obvious Before the gripper operates the object maintains its shape When the grip force level is set at level 1 there was a slight change in the shape of the object I ...

Page 65: ...red for the gripper to grip different objects varies For example the force level is recommended to be set at a lower level for gripping egg shells and at a higher level for gripping a cup Set the force level based on your actual requirement and desired effect 1 Description Control Gripper to Open Close or Not Move 2 Type Execution 3 Example Flexible gripper movement Control the gripper to first op...

Page 66: ...s such as Wait for 1 s 2 The gripper remains still after it reaches its limit 1 Description Returns True when the current gripper status meets the condition otherwise returns False 2 Return value Boolean 3 Example Gripper opening duration Learn the time taken for the gripper to fully open from being fully closed ...

Page 67: ...66 It can be observed from the FPV window that it takes about 2 1 seconds ...

Page 68: ... gripper s movement according to its current state until it is fully closed 1 Description Learn whether the gripper is fully opened If the return value is 1 the gripper is fully opened if the value is 0 the gripper is not fully opened 2 Type Information 3 Example Gripper opens Control the gripper s movement until it s fully opened When the gripper is fully opened the chassis LED indicator is solid...

Page 69: ... a parallel robotic arm It has a more complex structure which comes with a high load bearing capacity rigidity and precision It is driven by two servos installed at the bottom of the robotic arm 2 The end executor of the robotic arm is the gripper By controlling the connecting rod of the robotic arm the gripper moves forward and backward along the direction the robot s heading and upward and downw...

Page 70: ... a water bottle in front of the robot and control the robotic arm so that it can accurately reach the target position After that use the gripper to grasp the bottle then finally turn the robot around Note 1 Mark the origin when connecting the robotic arm and proceed according to the instructions in the manual 2 Flexibly control the robotic arm the gripper and the mobile chassis so that the robot c...

Page 71: ...are by moving the robotic arm and then return to the original position 1 Description Obtain the current position of the robotic arm The position parameter is x abscissa y ordinate The unit is millimeter 2 Type Execution 3 Example Control the robotic arm to return it to the original position Control the robotic arm to return to the original position through calculating the difference between the cu...

Page 72: ...le If the set angle is a positive value the servo rotates clockwise if the set angle is a negative value the servo rotates counterclockwise 2 Type Execution 3 Example Pendulum Make a pendulum using a servo a servo gear and adhesive tape then control the servo so that it rotates back and forth between 45 and 45 ...

Page 73: ...control the servo is not supported 1 Description Control a specified servo No to return to its original position 2 Type Execution 3 Example Check servo performance To check the performance of servo No 1 control the servo to perform a clockwise rotation at the maximum speed gradually decelerating to a stop then control it to rotate counterclockwise continuously accelerating When the servo rotation ...

Page 74: ...Execution 3 Example The servo speed changes along with the direction Control the servo to accelerate while rotating clockwise and to decelerate while rotating counterclockwise Note The servo supports two kinds of control angle control and speed control This module is applicable to cases with a high requirement for speed control of the servo which will continuously rotate without any positioning li...

Page 75: ...Description Obtain the angle of a specified servo No 2 Type Information 3 Example Servo angle Obtain the changes of the servo angle as the servo rotates continuously It can be observed through the FPV window ...

Page 76: ...75 ...

Page 77: ...tings block 3 Example Imitate V signal hand gesture Sets the gimbal to translate in a V shape when the robot identifies the V sign hand gesture Note The robot s smart identification function is disabled by default You must enable the identification function for the robot to be able to respond to identifiable objects For example I ...

Page 78: ...77 or ...

Page 79: ...ion_enum enum rm_define vision_detection_marker rm_define vision_detection_pose rm_define vision_detection_car rm_define vision_detection_people 1 Objective Enables disables line identification 2 Type Settings block 3 Example Identify blue lines When the robot identifies blue lines all blue LED chassis and gimbal indicators will blink Note 1 The line identification function is disabled by default ...

Page 80: ...efine vision_detection_line 1 Objective Enables disables clapping identification 2 Type Settings block 3 Example Wake up the robot by clapping Initially the LED chassis and gimbal indicators are turned off When the robot identifies a double clap all red LED chassis and gimbal indicators will blink and the red LED gimbal indicators will scroll Note Clapping identification is disabled by default and...

Page 81: ...ple Set identification distance When the robot identifies a forward arrow it will translate forward by 1 meter Note 1 If the Vision Marker is placed more than 1 meter away from the robot for example 1 5 or 2 meters away from the robot the robot will not be able to identify it 2 The identification distance only applies when using Vision Markers of the official standard size The effective identifica...

Page 82: ...e chassis LED indicator stays solid red after it identifies the green label number 1 the chassis LED indicator stays solid green Note The default identifiable visual tag color is red 1 Objective Sets the specific line color the robot will be able to identify 2 Type Settings block 3 Example Identify blue lines When blue tape is laid on the ground the robot will translate along the blue lines ...

Page 83: ..._follow_color_set color_enum Parameters color_enum enum rm_define line_follow_color_blue rm_define line_follow_color_red rm_define line_follow_color_green 1 Objective Reduces the exposure in Line Follow Mode to prevent blurriness caused by fast turns ensuring effective and accurate visual identification ...

Page 84: ...Settings block 3 Example Identify lines Python API Function media_ctrl exposure_value_update exposure_value_enum Parameters exposure_value_enum enum rm_define exposure_value_large rm_define exposure_value_medium ...

Page 85: ... heart it will automatically aim toward it if the robot fails to identify the red heart within five seconds it will exit the program and run the next program Python API Function vision_ctrl detect_marker_and_aim marker_enum Parameters rm_define marker_trans_red_heart rm_define marker_trans_target rm_define marker_trans_dice rm_define marker_number_ zero nine rm_define marker_letter_ A Z 1 Objectiv...

Page 86: ...fies a right arrow the right turn LED indicators on the gimbal will blink and the chassis will translate right for 1 second Control attitude A person can stand at a distance of 1 meter from the robot and control its movements using gestures When the person makes a V sign the robot will translate forward when the person makes an inverted V sign the robot will translate backward ...

Page 87: ...art running once the triggering conditions are fulfilled 2 To have the robot identify a person rotate the gimbal slightly upward have the person stand at a distance of 1 meter and ensure that the person stands upright within the robot s field of view 3 The person signaling to the robot must make the V sign and the inverted V sign with their arms as opposed to fingers ...

Page 88: ...on_recognized_marker_trans_red_heart msg def vision_recognized_marker_trans_target msg def vision_recognized_marker_trans_dice msg def vision_recognized_marker_number_all msg def vision_recognized_marker_number_ one nine msg def vision_recognized_marker_letter_all msg def vision_recognized_marker_letter_ A Z msg Type Event callback 1 Objective Sets the block to run its internal program when a spec...

Page 89: ...PI Function def sound_recognized_applause_twice msg def sound_recognized_applause_thrice msg Type Event callback 1 Objective Sets the robot to return the condition True when specified information such as an object ...

Page 90: ...l indicators will remain in the default color Note Try to use this block with conditional statements whenever possible Python API Function vision_ctrl check_condition condition_enum Parameters condition_enum enum rm_define cond_recognized_people rm_define cond_recognized_car rm_define cond_recognized_marker_trans_all rm_define cond_recognized_marker_trans_left rm_define cond_recognized_marker_tran...

Page 91: ...tter_all rm_define cond_recognized_marker_letter_ A Z rm_define cond_recognized_pose_all rm_define cond_recognized_pose_victory rm_define cond_recognized_give_in rm_define cond_recognized_capture 1 Objective Sets the robot to return the condition True when a specific clapping pattern is identified otherwise the condition False is returned 2 Boolean block 3 Example Stop motion with clapping This se...

Page 92: ...use_thrice 1 Objective When specific information such as an object Vision Marker gesture and so on is identified the system will continue executing commands otherwise it will continue to wait 2 Type Execution block Blocking block 3 Example Practice shooting Note If the target marker is not identified the program in this block will continue waiting and the block will be highlighted ...

Page 93: ...ognized_marker_trans_dice rm_define cond_recognized_marker_number_all rm_define cond_recognized_marker_number_ zero nine rm_define cond_recognized_marker_letter_all rm_define cond_recognized_marker_letter_ A Z rm_define cond_recognized_pose_all rm_define cond_recognized_pose_victory rm_define cond_recognized_give_in rm_define cond_recognized_capture 1 Objective Sets the system to continue to execu...

Page 94: ...thrice 1 Objective Obtains information for an identified Vision Marker returned as N ID X Y W and H parameters 2 Type Information block list type data 3 Example Recognize Vision Markers When a Vision Marker appears in the robot s field of view you will be able to observe Vision Marker parameters in the FPV page You can move the Vision Marker to observe changes to any of the 6 parameters ...

Page 95: ...cted The second item is a group of 5 values Vision Marker ID X axis of the center point Y axis of the center point W width and H height The same format is used for all following items as shown below 2 Descriptions for returned ID values identified by the robot ID 0 emit sounds ID 1 stop ID 2 dice ID 3 target ...

Page 96: ...rson or robot s information in terms of the parameters N X Y W and H 2 Type Information acquisition block list type data 3 Example Identify another S1 robot When another S1 robot appears in the robot s field of view information about the robot will display in the FPV window You can move the other robot within your robot s field of view and observe how these 5 values change You can observe data cha...

Page 97: ...and H height The same format is used for all following items as shown below Python API Function vision_ctrl get_people_detection_info vision_ctrl get_car_detection_info Return value detection_info list 1 Objective Acquires identified gesture information in terms of the parameters N ID X Y W and H 2 Type Information block list 3 Example Identify posture You can observe changes in gesture related da...

Page 98: ... of the center point Y axis of the center point W width and H height The same format is used for all following items as shown below 2 Descriptions for ID values ID 4 V ID 5 inverted V ID 6 take photo Python API Function vision_ctrl get_pose_detection_info Return value detection_info list 1 Description Obtain identifiable single line information The parameters are N Info X Y θ and C ...

Page 99: ...ngle line information format that is identifiable by the robot is as follows The first item N is the number of points identified on the line the second item Info is the line type and the subsequent items are grouped into 4 data groups they are the Coordinate X ordinate Y actual tangent angle θ curvature C of ten points that are equidistant from each other on the line from the nearest to the farthe...

Page 100: ...dicates a crossroad The third and fourth data sets X1 and Y1 indicate the coordinate information of the first point on the line The first point is at the bottom of the FOV which is the point closest to the robot The fifth data set θ1 Tangent angle of the first point When the tangent angle is 0 it means that the angle between the tangent and the vertical direction of this point is 90 degrees when t...

Page 101: ...it proves that the radian of the line near this point is larger 2 If no line is identified by the robot the length of the returned line data is 2 while the value of the first and second items are all 0 1 Description Obtain identifiable multi line information The parameters are n X Y θ and C 2 Type Information table type data 3 Example Multi line blink indication When the robot identifies N lines a...

Page 102: ... θ C of ten points on the second line the X Y θ C of ten points on the numbered n line There are altogether 40n 1 values Compared with the Identifiable Single Line Information module the Identifiable Multi Line Information module has one feedback more on the number of lines 1 Objective Obtains information about the brightness of the current environment and returns a value of 0 10 the greater the v...

Page 103: ...ue brightness_value int 1 Objective Obtains information for sight position in terms of the parameters X and Y 2 Type information block list 3 Example Follow visual markers This will convert the difference between the sight position and a Vision Marker in the robot s field of view into a gimbal rotation angle value in order to direct the gimbal to move toward the Vision Marker ...

Page 104: ...103 Note Sign position format X represents X coordinate and Y represents Y coordinate Python API ...

Page 105: ...104 Function media_ctrl get_sight_bead_position Return value sight_bead_position list ...

Page 106: ...Response to tapping Tap anywhere on the EP s armor to play the corresponding sound effect Note Configuring armor sensitivity is only available in laboratory testing Any armor sensitivity settings will be restored to default during competition Python API Function armor_ctrl set_hit_sensitivity value Parameters value int 0 10 1 Objective Runs the block s program when the armor is hit at a specified ...

Page 107: ... the armor is hit the robot s HP reduces by 1 when the HP level drops to 0 all LEDs will turn off and the robot will stop moving Note Event blocks have the highest priority and contain programs where main function will pop out and begin to run when certain conditional statements are met regardless of the main function s current status ...

Page 108: ...op_right msg def armor_hit_detection_top_left msg Type Event callback 1 Objective Displays information for the last armor section hit the ID value indicates the specific section that was hit and the running time shows the time it was hit 2 Type Information block variable type 3 Example Configure hit section indicator If the gimbal is the last armor section hit all LEDs on the gimbal will flash red...

Page 109: ...t_index Return value index int Function armor_ctrl get_last_hit_time Return value time float 1 Objective Continuously detects hit sections on a specific armor section When the armor is hit True is returned otherwise False is returned 2 Returned value Boolean 3 Example Configure quick retreat If the left side of the chassis is hit the robot will retreat by moving to the right if the front of the ch...

Page 110: ...ameters condition_enum enum rm_define cond_armor_hit rm_define cond_armor_bottom_front_hit rm_define cond_armor_bottom_back_hit rm_define cond_armor_bottom_left_hit rm_define cond_armor_bottom_right_hit rm_define cond_armor_top_left_hit rm_define cond_armor_top_right_hit ...

Page 111: ...sis is not hit the program will wait and remain on this block and the block will remain highlighted Python API Function armor_ctrl cond_wait condition_enum Parameters condition_enum enum rm_define cond_armor_hit rm_define cond_armor_bottom_front_hit rm_define cond_armor_bottom_back_hit rm_define cond_armor_bottom_left_hit rm_define cond_armor_bottom_right_hit rm_define cond_armor_top_left_hit rm_d...

Page 112: ...d by infrared beams 2 Type Execution 3 Example Health light bar The gimbal LED indicator can indicate the current hit points of the robot and the maximum hit points is 8 When the robot is attacked by infrared beams the robot loses 1 hit point when the hit point is 0 the LED indicator extinguishes and the robot stops moving ...

Page 113: ...in function and start running the programs in the event module 1 Description Execute the next instruction only after the infrared sensors on both sides of the gimbal are attacked by infrared beams otherwise continue to wait 2 Type Execution Blocking 3 Example Self rotate for protection After being attacked by infrared beams the robot rotates in place to reduce the probability of being hit and figh...

Page 114: ...113 Note For this function if no infrared beam attack is detected by the infrared sensor on the robot s gimbal the program will wait on this module and the module will remain highlighted at this time ...

Page 115: ... sides of the robot s gimbal have been attacked by infrared beams Returns True if yes otherwise returns False 2 Return value Boolean 3 Example Number of hits If the robot is attacked by an infrared beam a hit sound is played and the number of hits is accumulated ...

Page 116: ...115 ...

Page 117: ...cified infrared distance sensor No 2 Type Setting 3 Example Distance measuring using infrared beams Measure the distance between the infrared distance sensor and your palm Move your palm forward and backward and observe the real time distance change through the FPV window Note I ...

Page 118: ...ance between the sensor and the measured object by calculating the time flight time the light pulse takes to reflect off the object 1 Description Run the program in this module when the distance measured by the specified infrared distance sensor No meets the condition 2 Type Event 3 Example Continuously approaching Control the robot mobile chassis so that it continuously translates towards the wal...

Page 119: ...s the condition otherwise it will stay still and wait 2 Type Execution Blocking 3 Example Long distance shooting Hold a visual tag and back away from the robot When the infrared distance sensor detects that the target is already 3 meters away from the robot the robot will fire a long range shot by zooming in with the camera ...

Page 120: ...mastered the I retreat as you advance I advance as you retreat strategy if the distance measured by the infrared distance sensor is 20 cm the robot translates backward if the distance is 20 cm the robot translates forward 1 Description Obtain the distance measured by the specified infrared distance sensor serial No The unit is centimeter 2 Type Information 3 Example Distance measuring using infrar...

Page 121: ...0 Move your palm forward and backward and observe the real time distance change through the FPV window Note The distance that the infrared distance sensor can read ranges from 10 centimeters to 10 meters ...

Page 122: ... port of the specified sensor adaptor meets the conditions 2 Type Event 3 Example Use a button to control the opening or closing of the gripper Connect a button to sensor adaptor No 1 When the button is pressed the robot gripper opens When the button is released the robot gripper closes Note I ...

Page 123: ...evel of the specified port of the specified sensor adaptor meets the conditions otherwise it will continue to wait 2 Type Execution blocking 3 Example Give a warning when the decibel level is too high After a sound sensor is connected to sensor adaptor No 1 if the detected sound is too loud the chassis LED indicator will turn solid red Note 1 The sound signal received by the sound sensor used in t...

Page 124: ...low electrical level Tilt sensor VCC 5V GND OUT TTL High or low electrical level Sound sensor VCC 5V GND OUT TTL High or low electrical level Disk encoding technology VCC 5V GND OUT TTL High or low electrical level Touch sensor VCC 5V GND OUT TTL High or low electrical level 1 Description Returns True when the I O pin level of the specified port of the specified sensor Adaptor ...

Page 125: ...ed in this function design will output a high electrical level if a finger touches it and a low level when it is not touched but the situation for different types of touch sensors varies 1 Description Read the ADC pin value of a specified port of a specified sensor adaptor 2 Return value Information 3 Example Temperature alarm Connect a temperature sensor to sensor adaptor No 1 A sound alert is pl...

Page 126: ...alue Devices such as pressure sensors potentiometers and others have ADC output Trigger ADC Photo resistor sensor module VCC 5V GND OUT TTL OUT AD High or low electrical level ADC Water level sensor VCC 5V GND OUT AD ADC Hall sensor VCC 5V GND OUT AD OUT TTL High or low electrical level ADC Flame sensor module VCC 5V GND OUT AD OUT TTL High or low electrical level ADC ...

Page 127: ...rical level ADC 1 Description Obtain the duration from when the pulse of the specified I O pin of the specified sensor adaptor jumps till it is obtained The unit is millisecond 2 Return value Information 3 Example Photo taking Connect a button to sensor adaptor No 1 Starts taking photos if the button is pressed for more than 3 seconds ...

Page 128: ... need to first set the robot to Free Mode 2 Mobile device refers to devices such as smartphones and tablets 3 The gesture angle for mobile devices ranges from approximately 180 to 180 For the yaw axis Motion to the right is positive 0 180 For the pitch axis Upward motion is positive 0 180 For the roll axis Motion downward and to the right is positive 0 180 Python API Function mobile_ctrl get_attit...

Page 129: ...down to control the robot s motion in a forward direction Note 1 The faster the robot s velocity changes the higher the rate of acceleration that will be obtained 2 Mobile device refers to devices such as smartphones and tablets Python API Function mobile_ctrl get_accel axis_enum Parameters axis_enum enum rm_define mobile_accel_x rm_define mobile_accel_y rm_define mobile_accel_z ...

Page 130: ...129 1 Description Choose notes and play them in a piano tone 2 Type Execution non blocking 3 Example Pink Memory Control the robot to play the notes of the song Pink Memory I ...

Page 131: ...130 ...

Page 132: ...nd when the chassis is translating forward and the gimbal is rotating around the Yaw axis Python API Function media_ctrl play_sound sound_enum wait_complete_flag False Parameters sound_enum enum rm_define media_sound_attacked rm_define media_sound_shoot rm_define media_sound_scanning rm_define media_sound_recognize_success rm_define media_sound_gimbal_rotate rm_define media_sound_count_down ...

Page 133: ... start countdown chime If it does not identify a take photo gesture it will continue to rotate and search for the gesture while playing a scanning sound Note play sound refers to simultaneous execution of the music and the next command similar to a musical accompaniment play sound until finished refers to one being executed after the other making the sound more like a musical solo Python API Funct...

Page 134: ..._sound_gimbal_rotate rm_define media_sound_count_down 1 Objective Sets the robot to emit a specified shutter sound when it takes photos Photos will appear in an album 2 Type Execution block 3 Example Capture moving person Note Users will need to insert an SD card with an available memory of more than 2G to operate the take photo command Python API Function media_ctrl capture ...

Page 135: ...n the SD card 2 Type Execution block 3 Example Video recording Note Users will need to insert an SD card with an available memory of more than 2G to operate the start video recording command Python API Function media_ctrl record enable_enum Parameters enable_enum enum 1 0 ...

Page 136: ...uration 2 Type Execution block 3 Example Complete a square This will command the EP to translate in the following order to complete a square every two seconds by moving as translating right forward left backward Python API Function time sleep t Parameters t float 0 3600 s I ...

Page 137: ... finite loop block 2 Type Execution block 3 Example Translate along a zigzag line This will control the robot to translate along a zigzag line 1 Objective Sets an internal program to repeat continuously infinite loop 2 Type Execution block 3 Example Rotate chassis left and right ...

Page 138: ...137 1 Objective Runs an internal program when the condition is True 2 Type Conditional statement block 3 Example Rotate and revolve This will control the robot to revolve while rotating ...

Page 139: ...am when certain conditional statements are met regardless of the main function s status whereas conditional statement blocks will not run unless the main function preceding it and corresponding conditions are met 1 Objective Runs the then program when the condition is True and runs the else program otherwise 2 Type Conditional statement block ...

Page 140: ...s being 8 beads time then restart from 1 bead time again 1 Objective Repeats a program until the condition is True and then executes the next command 2 Type Conditional statement block 3 Example Complete different paths This will control the robot to complete paths based on the following shapes triangle square pentagon and hexagon ...

Page 141: ...the ideal number of loops 1 Objective Stops a running program for the current block and exits 2 Type Execution block 3 Example Stop a running program This will control the chassis to translate backward for 0 5 second and then stop the program when it hits an obstacle ...

Page 142: ...ck the result using the FPV window Note Arithmetic calculations cannot be performed on lists 1 Objective Subtracts one number from another 2 Type Variable type block 3 Example Calculate an arithmetic progression This will calculate an arithmetic progression according to the formula An A1 n 1 d with the first calculate item as 1 and a tolerance of 2 I ...

Page 143: ...142 You can check the result using the FPV window Note Arithmetic calculations cannot be performed on lists 1 Objective Multiply two numbers ...

Page 144: ...rse display when the gimbal is rotating on the right side of the chassis the value will always be negative when the gimbal is rotating on the left side of the chassis the value will always be positive Note Arithmetic calculations cannot be performed on lists 1 Meaning Divide one number by another 2 Type Variable type block 3 Example Drift This will control the robot to drift and pull up ...

Page 145: ... block variable type 3 Example Play a number guessing game Guess a number to enter and compare it to the random value generated by the robot If your answer is greater than or equal to the robot s number the gimbal will celebrate with a lighting effect if your answer is less than the number the gimbal makes an effect to show disappointment ...

Page 146: ...d range is a decimal whether it is the first last or any in between the output will also be a decimal 1 Objective Rounds up to obtain the nearest integer to a given value 2 Type Information block variable type 3 Example Slow down chassis rotation When the chassis rotates to the right the rotation speed will decrease gradually from 600 degrees sec to 60 degrees sec ...

Page 147: ...e Obtains the remainder of the first value divided by the second value 2 Type Information block variable type data 3 Example Find the lowest common multiple The robot will find the lowest common multiple of 12 and 15 ...

Page 148: ...west common multiple 1 Objective Performs mathematical operations for a variety of functions such as calculating absolute value floor and ceiling functions square root and sine angle 2 Type Information block variable type 3 Examples Perform calculation Rotate gimbal Perform calculation ...

Page 149: ...148 You can check results using the FPV window ...

Page 150: ... 1 Objective Returns True when two values are equal otherwise False is returned 2 Returned value Boolean 3 Example Set flag bits Initially the gimbal displays a solid default color All LEDs on the gimbal will turn solid red when the users clap two times and solid yellow when the user claps three times ...

Page 151: ...rue when two values are not equal otherwise False is returned 2 Returned Value Boolean 3 Example Indicate successful identification of one person If no person or multiple people appear in the robot s field of view the scanning sound effect will play if exactly one person is identified however the identified successfully sound will play ...

Page 152: ... the same meaning as in mathematical language 1 Objective Returns True if the first value is less than the second value otherwise False is returned 2 Returned value Boolean 3 Example Light all platform LED lights in sequence This will light up all gimbal LEDs in sequence ...

Page 153: ...the second value otherwise False is returned 2 Returned value Boolean 3 Example Accelerate rotation If the chassis is rotating at a rate less than or equal to 540 it will increase by 60 degrees per second while rotating to the right for 3 seconds at a time until the maximum value of 600 degrees per second is achieved and acceleration stops ...

Page 154: ...alue is larger than the second value otherwise False is returned 2 Returned value Boolean 3 Example Calculate cumulative sum 1 10000 This will calculate the accumulated sum of 1 2 3 10000 you can check the result using the FPV window displayed as sum 50005000 ...

Page 155: ...Show where the armor was last hit If the gimbal armor was hit last all gimbal LEDs will blink red if the chassis armor was hit last all chassis LEDs will blink red Note As in mathematical language is the standard symbol for greater than or equal to in programming language 1 Objective Returns the condition True when two conditions are met otherwise the condition False is ...

Page 156: ...tions and the returned result will be a Boolean value True or False Boolean values 1 Objective Returns the condition True if either of a set of two conditions is met False is returned if neither condition is met 2 Returned value Boolean 3 Example Turn toward an enemy robot after being attacked The gimbal will rotate to the left to fight back when the left side armor is struck Because the left side...

Page 157: ... if a condition is met otherwise True is returned 2 Returned value Boolean 3 Example Set either or conditions If any point of the gimbal armor is attacked all gimbal LEDs will blink red if any point of the chassis armor is attacked all chassis LEDs will blink red Here when the attached armor is not on gimbal this indicates it must be on the chassis ...

Page 158: ... 2 Type Information 3 Example Ratio conversion The data collected by the sensor is actually a 10 bit voltage value with 1024 discrete voltage levels with the value range of 0 to 1023 The value we see in the FPV window is the value after mapping so only by conversion scaling the value within the set range to another range according to the proportional relationship can the true voltage value be know...

Page 159: ...158 ...

Page 160: ...er Variable names need to begin with an underscore or a letter and can only contain numbers uppercase and lowercase letters and underscores Note After a variable name is created you can assign and adjust the value using the three blocks available 1 Objective Contains information about the variable 2 Type Information block variable type 3 Example Switch on LEDs one after another This will command t...

Page 161: ...160 Note Right click on a variable to rename or delete it 1 Objective Assigns value to a variable 2 Type Execution block 3 Example Configure a digital clock ...

Page 162: ...tinuously Note 1 It is important to know the difference between a variable and a list a variable stores one type of data while a list stores a string containing a sequence of characters 2 For a variable the input value can be a number a variable or variable type data but cannot be a list or a list data type ...

Page 163: ...negative values indicate a decrease 2 Type Execution block 3 Examples Decrease variable value by 1 Translate in a figure 8 pattern Decrease variable value by 1 Assign a value to the variable then configure the change in value In the FPV window you can see that the initial variable value is 2 ...

Page 164: ...aiting time to 2 seconds and decrease the value by 1 the variable value becomes 1 Translate in a figure 8 pattern The screenshot below shows an alternative configuration for setting the robot to translate in figure 8 pattern ...

Page 165: ...164 1 Objective Creates and names a list 2 Type Settings block 3 Example Name a new list ...

Page 166: ...derscores Note After a list is created assign and adjust the corresponding values using the blocks available 1 Objective Obtains all items in a list 2 Type Information block list 3 Example Duplicate a list Ensure that the data in the new list CopyList and the current List are the same and that the current running time is shown ...

Page 167: ...ow 1 Objective Adds an item to the end of a list 2 Type Execution block 3 Example Display multiples of 5 The configuration below allows you to obtain and display all multiples 0 of 5 In the FPV window a multiple of 5 is added to the list every 0 5 seconds ...

Page 168: ...67 Note The input value can be a number a variable or variable type data but cannot be a list or a list type data 1 Objective Assigns values to a list 2 Type Execution block 3 Example Recognize a person ...

Page 169: ...68 In the FPV window the list is configured to recognize a person and generate relevant information Note 1 List values can be numbers lists or list type data but cannot be variables or variable type data ...

Page 170: ...169 2 You cannot perform arithmetic operations directly on a list 1 Objective Deletes an item from a list 2 Type Execution block 3 Example Delete the number of people ...

Page 171: ...170 In the FPV window the list length changes from 5 to 4 after deleting the first item Before After ...

Page 172: ...leting it 2 After deleting an item the number of items decreases and their serial numbers change accordingly 1 Objective Deletes all items or the last item from a list 2 Type Execution block 3 Example Clear list All Items In the FPV window the list length changes from 5 to 0 ...

Page 173: ...172 Before After 1 Objective Inserts an item at a specific location in a list and shifts subsequent items down the list 2 Type Execution block 3 Example Insert program runtime timer ...

Page 174: ...ed tape and observe the FPV window You can see that the program runtime is inserted as the first item of the list the original items are shifted down the list and the total number of items increases by 1 Before After ...

Page 175: ...174 1 Objective Replaces an item on the list 2 Type Execution block 3 Example Replace a value This will make every value in List_B be greater than the corresponding value in List_A by 1 ...

Page 176: ...a value before it can be replaced For example if List_B is empty you will not have any items to replace it with 1 Objective Returns a specific item on a list 2 Type Information block variable type 3 Example Specify an item on a list ...

Page 177: ...and data3 5 1 Objective Obtains the location of the data s first occurrence in the current item 2 Type Information block variable type 3 Example Read the index value Create a list of 5 1 2 1 7 and set the index number for the first 1 to 2 ...

Page 178: ...177 You can check the result using the FPV window 1 Objective Obtains the total number of items for a list 2 Type Information block variable type 3 Example Calculate the number of items ...

Page 179: ...178 You can check value changes using the FPV window The length value starts at 2 and becomes 0 after deleting all items Before After ...

Page 180: ...rwise False is returned 2 Returned value Boolean 3 Example List containing a specified value If there is a specific value set for a list the gimbal LEDs will start to scroll Note The condition True will only return when the determining item meets the conditional statement ...

Page 181: ...ut information Python API Class rm_ctrl PIDCtrl 1 Objective Sets the PID controller error which is the difference between the target and returned values 2 Type Settings block 3 Example Follow a Vision Marker Manually hold and move a Vision Marker to control the gimbal s movement to follow This will set the PID controller error which is the difference between the center of the Vision Marker and the...

Page 182: ...m Obstructed Case Impact No Impact No Impact Impacted Impacted Impacted Fail to identify Note Before running the program make sure that the Vision Marker is aligned to the robot s field of view Python API Class rm_ctrl PIDCtrl Function set_error error ...

Page 183: ...rs Kp is the proportional coefficient Ki is the integral coefficient and Kd is the differential coefficient 2 Type Settings block 3 Example Follow Vision Marker Modify parameters of Kp Ki and Kd to optimize the closed loop control system Note ...

Page 184: ...ce period of the error signal As long as there is enough time the integral control can eliminate the steady state error Fail to overcome the effects of interference in a timely manner Differential Control D It can reflect change of speed of the error signal and have immediate control when the error just occurs Helps reduce adjustment time and improve system quality Cannot eliminate the steady stat...

Page 185: ...184 Python API Class rm_ctrl PIDCtrl Function get_output Return value output float ...

Page 186: ...ction block 3 Example Launch counterattack If the armor pieces on either side of the chassis are attacked the gimbal will turn to the side where it was attacked to aim a counterattack Note 1 Function names must begin with an underscore or a letter and can only contain numbers uppercase and lowercase letters and underscores I ...

Page 187: ...186 2 After a function has been created the packaged block will appear for use 3 Using functions helps make the whole program more concise and clear ...

Reviews: