86Duino Motion Editor

The 86Duino Motion Editor (86ME) supports the 86Duino board to edit robot actions, making the process of editing robot actions faster, and can automatically generate 86Duino programs for the robot to edit the actions. 86ME Concept Video:

 

Installation tutorials

Currently, 86ME supports Windows XP/Vista/7/8/10 and the MicroSoft .NET framework 4.5 must be installed in the environment. After downloading 86ME and unzipping it, you will get the folder 86ME, the file in it is shown in the figure below, including the 86ME executable file and the required libraries and related instructions, and you can start working on 86ME by executing 86ME .exe directly in a supported environment.

 

86ME16_content

Advance preparation

  1. Bridging the gap between 86Duino and 86ME: 86ME will transfer instructions to 86Duino through the Firmata library, so before using 86ME, you need to burn the sample draft of 86Duino Coding 210 (File->Examples->Servo86->MotionEditor) into 86Duino, and then you can start working on 86ME after establishing a bridge of communication between the two parties.
  2. Connection method and description: At present, 86ME supports the computer to connect with 86Duino with COM port and send action signals, 86ME will let users select the interface between 86Duino and the computer at the beginning, and it is divided into three modes: automatic, offline, and selected to initialize the connection. Before you can perform 86ME.exe, you must understand these patterns. The –auto– option in the diagram will open the last COM port to be added, COM4 means that 86ME detects the COM port that currently exists on the computer, and the –offline– option indicates offline mode and will not communicate with 86Duino.

86ME19start

Therefore, the offline mode only supports file editing and 86Duino program generation, and does not support real-time motor control. To directly control the motor to edit the action, connect the USB device on the 86Duino to the USB of the computer and select the COM port connected to the 86Duino (you can use the automatic or the known COM port) before using the program. If you want to check which port the 86Duino is connected to, you can try to find the COM port connected to the 86Duino in the device administrator, as shown in the example below, you can see the COM4 connection between the 86Duino and the computer. If you select automatic mode without connecting to 86Duino, the program will switch back to offline mode during execution.

P_20150508_172230

Generally speaking, the offline mode is more suitable for users who are already very familiar with the robot's movements, so that these users can easily edit existing files and make adjustments. The automatic mode makes it easy to get started with the 86ME, but if you have a computer with many 86Duinos or many different COM ports, it is recommended to use the selected mode to avoid confusion. Then, once the COM port is set, you can press the Start button to enter the main 86ME window or press the Exit button to leave the 86ME.

 

86ME19_start86ME19_Main

Feature description

Here, we will first divide the program interface into several blocks to illustrate.

86ME19_area

  1. This section has three drop-down menusFile、Options、Help, and the expanded options are as follows

86ME19_filetool

The File menu features new projects, read projects, save projects, and end programs, and the discerning reader may find that many of the buttons are gray out at first, and if you want to edit the action or test the action, you need to first create the project with File->New Project or use File->Open Project to read the previously saved project. File->Save Project saves the currently edited project, and File->Exit ends the program.
So how do you add a new project? Clicking on File->New Project will bring up a Robot Configuration window, in which you can set four robot-related settings.

  1.  86Duino Board: used to select the 86Duino model used by the robot, there are currently 86Duino One/Zero/EduCake for users to choose, and different models of 86Duino will open different numbers of SetServo for users to set, for example, 86Duino One has 45 pins that can control the motor, then SetServo 0~44 will appear, and 86Duino Zero Only SetServo 0~13 and 42~44 will appear.

86ME191_boardver

  1.  IMU Settings: Set the Inertial Measurement Unit (IMU) used by the robot, currently supported IMU models are 86 built-in IMU and RM-G146 on Duino One. When the IMU model is selected and in connection mode, the IMU connected to the 86Duino can be initialized by the "Initialize IMU" button, and the Base Orientation of the current IMU can be detected by "Auto Detect Orientation". After these settings are completed, the IMU compensation function can be used correctly to facilitate the balance of the robot.

86ME191_IMU

  1. SetServo: Used to set the motor connected to the 86Duino, the motor model, offset (offset), start position (homeframe), maximum (Max) and minimum value (min) supported by the motor are provided for users to set, and the motor models currently supported are as follows:

86ME191_servos

After selecting the motor, you can adjust the offset and starting position through the scroll control option in the figure below, and after checking the Sync control item, you can synchronize the offset and the angle of the starting position on the motor, which can be adjusted instantly. The acceptable value range of the motor will be automatically changed after the motor is selected, and if you want to manually modify it, you must first check the min max control in the upper right corner. If you have set the IMU, you can set the IMU Src to turn on the IMU compensation function and select the compensation source, and set the compensation coefficient through the Gain field, if you want to add a second compensation source, you can press the Src 1 icon to switch to Src 2 to set the second set of compensation sources.

 

86ME191_robotconfig

  1. Load Robot Picture: In order to facilitate the corresponding position of the motor to each part of the robot, the user can select a picture as the representative image of the robot, and can select the corresponding position of the servo and the picture when editing the frame, so that the user can easily identify the correspondence between the server and the actual robot.
  2. Load Mirror Config: This function can read the user-defined mirror configuration, which is used to facilitate the editing of symmetrical robots, such as humanoid robots, when editing the left half of the action, you can use this function to copy the left half of the body to the right half of the body, and speed up the process of action editing. The image configuration has a file with the extension cfg, which indicates the one-to-one correspondence between the servers, and each line is written with a set of correspondences, separated by a "-" sign, for example, 1-2, which means that the servers on pins 1 and 2 are symmetrical edges, 1 is left, 2 is right, and so on.
  • The Options menu contains the Robot Configuration option, which allows you to edit the current robot-related settings, just like File->New Project.
  • The Preference menu is the language that provides a user-selectable interface and currently supports English, Chinese Traditional, Chinese Simplified, and Japanese.
  • The Help menu contains Tutorials and About options, clicking on Tutorials will take you to the 86Duino website with 86ME documentation, and About will show you 86ME related information, such as author information, 86Duino official fan page, etc.

 

  1. The Edit Settings block has the following functions

86ME19_editsettings

  1.  The Sync function allows the user to decide whether to synchronize the currently selected frame to reflect on the robot in real time.
  2. The puller here can determine the speed of the motor rotation when syncing, which is divided into five levels, the right is the fastest, and the left is the slowest.
  3. Release the motor so that the motor no longer outputs.
  4. Capture, used to read the angle of the current motor, the currently supported motors are Kondo, Hitec, Futaba three series, please be especially careful when using, because the Capture function will release all the motors first, if the robot is not supported, the robot may fall.

 

  1. Action block, which can be used in

 

86ME19_action

  1.  Set the time to move to this action in milliseconds.
  2. When the selected Action is Frame, two buttons will appear in the Action block to store/read the 86Duino Frame File. The save function can save the server angle of the currently selected frame in a text file, and the read function can read the value of the saved frame file to the current frame.

86ME15_slframefile

  1. Hint block, in this block will provide users with some hints, such as how to add a list of actions, what are the precautions when executing actions, etc., if you are already very familiar with 86ME, you can make a program according to your own ideas, and the tips are basically for users who have just started using 86ME to provide the next step.
  2. Motion block, which is used to edit and test the robot's movements. Each action will be separated by "Motion Name", for example, the user can add actions such as walking, punching, crouching, etc., pressing the "+" button will pop up a window for the user to decide the "Motion Name", as shown below:

 

86ME19_motionanme

 

Press "OK" to add an action. If you want to add another action, press "+" and repeat the same process, or if you want to edit another action that already exists, you can use the scroll in the "Motion Name" field to select. The gear-type button on the far right provides a number of functions for managing Motion, including:Copy, rename, delete, import and export

86ME19_addmotion

Action List:
Once you've created your Motion, you can start editing the Action List, for example, if you need four frames to render an action, you can right-click in the Action List to add an action.

86ME191_addaction

The main works on Action List are:

  1. Added Actions, with a total of nine types of Actions
  2. Perform mirror work on the selected frame (as shown in the figure above and right, a total of five kinds of work), including image copy (left-to-right and right-to-left, the left-right relationship is defined in the image file), mirror copy with reverse value (relative to the server home value), and left-right swap.
  3. Delete the selected action
  4. You can copy the Frame or HomeFrame in the next grid
  5. Actions can be moved up and down using the two buttons below.

86ME19_arrow

Action List also has a convenient function, when the back of the frame is immediately followed by the Frame, a function will be turned on to insert a frame, the angle of each motor is the result of the addition of the two frames corresponding to the motor before and after dividing by two, this function can be convenient for editing the action between two frames that move a large distance. The adjustment of the action parameters will be explained in block 6 with the usage example.

86ME191_intermediate

After editing the action bar, if you are connected to the 86Duino, you can press the play button to test the action from the first action to the last action in the Action List, and the user can test the action through this function.

86ME19_motiontest.png

Trigger:
As for the bottom two buttons, the current project is output as an ino program file that can be burned into 86Duino, Generate 86Duino Sketch (with Frame Files) will produce an ino file and several action configuration files, and Generate 86Duino Sketch (All in One) will write all the settings into an ino program. The file is generated according to all the actions currently edited plus the Trigger and Property of each action, and the setting of the Trigger is to select a Motion and go to the Trigger tab to set it, and there are currently five supported Trigger methods, namely auto, keyboard, bluetooth, ps2 controller and Accelerometer.

86ME16_triggers

  1. Auto is divided into Always On, Always Off, and Start Up. Always On means that the action will always be displayed, Always Off means that the action will never be displayed, and Start Up will be displayed once when 86Duino starts up.
  2. The keyboard can be configured with Key and Type, the Key currently provides A~Z and up, down, left, right, blank, and ESC to select, and Type provides First Press, Pressed and Release, and Motion will be triggered in the case of Key and correspondence. For example, when the robot's walking is set to Key A and Pressed, the robot returns to the standing position and is set to Key A and Release, when we press the A button, the robot can keep walking, and when we release the A button, it will return to the standing position.
  3. Bluetooth can select a single-character key input, as well as the Baud Rate and Serial Port where the Mode and Bluetooth modules are located. For example, we install the Bluetooth module in the Serial1 of 86Duino, set the key of the Motion to B, and after generating the program and burning, we can use the mobile phone APP software (currently only supports the transmission of a single character APP) to transmit signals to control the robot to move forward. The Mode option is divided into OneShot and Continuous, OneShot mode will make the signal only trigger the action once, which can be used for the robot punch, kick and other actions, while Continuous will constantly trigger the action, which can be used for forward, backward and other actions.
  4. The PS2 Controller can select the button on the PS2 controller as the key, and set the type that triggers the button just like the keyboard. In addition, if you want to control the robot with a PS2 controller, you must also set the four pins that connect PS2 to 86Duino, which are the 86Duino pin pins corresponding to the four pins of DAT (data), CMD (command), ATT (attention), and CLK (clock).

86ME19_acc

  1. The Accelerometer can select the readings of the X, Y, and Z axes of the accelerometer as the starting condition, as long as the range of the three axes is set and the time for which the reading lasts. The "Auto Detect" button is the one that automatically detects the current accelerometer reading when the IMU is correctly initialized in the Robot Configuration, and automatically selects a range to fill in the blanks.

86ME19_wifi602

  1. WiFi Camera (WiFi602)It is a video streaming module with 5V, GND, TX and RX pins, and will set up a WiFi AP when powered on, so that the mobile phone can connect to this WiFi and turn it onAPPYou can get the stream. In addition, the button status of the APP can also be transmitted through the Serial Port, so you need to select a Serial Port, and the currently supported keys are Up, Down, Left, Right, A and B as shown in the figure below.

86ME19_wifi602app
86ME191_analogtrigger

  1.  Analog can trigger the action through the analog signal, as shown in the figure below, the Pin is used to set the analog source pin, the middle Combo Box is used to select the judgment conditions, including =, ≠, ≧, ≦, >, <, and Value, and the Value is used to select the value, and the action will be triggered when the condition is established.

86ME195_esp8266trigger

  1.  ESP8266 triggers currently support thisAPPFirst of all, connect the ESP8266 to the 86Duino and set it to the AP base station mode, then set the corresponding Baud Rate in the 86ME, the connected Serial Port and the ESP8266 CH_PD pin is connected to which PIN of the 86Duino, and then set the Key to correspond to the picture in the APP and you're done, the button in the APP is shown in the figure below, and its key value is the picture number before adding "$PM", For example, the key of the left button is "$PM 00".

86ME195_jrobotapp

Finally, before compiling the resulting program, you need to use the import library function in the coding IDE to import the ESP8266 library. After successful compilation, the connection between ESP8266, 86Duino and APP will be completed.

Property:

86ME19_property

Property settings are currently divided into:

  1. Blocking and Non-Blocking: The motion of Blocking will not be interrupted by other motions in the generated program, while the motion of Non-Blocking will be interrupted by the triggering of other motions.
  2.  Motion Layer: Set the level of the action, this function is to allow the action of different levels to be triggered at the same time, for example, when the humanoid robot is moving, it can still touch the action of punching. However, if the same server is used for actions in both levels, there is a question of priority, in this case that the actions of level 1 will take precedence over those of level 0. Therefore, when an action is set to Motion Layer 1, the user needs to check the server to be used in the Frame property, as shown in the figure below, so that when the action of level 0 and level 1 is triggered at the same time, the selected servers CH 2 and CH 3 will give priority to the action edited by level 1.

86ME19_chooseServo

  1.  Trajectory: The way to set the trajectory of the movement, currently supports Linear, Constrained Cubic, Natural Cubic and Catmull-Rom Spline four ways, the three Cubic planning methods can reduce the vibration generated during exercise compared to Linear, and the effect of Natural Cubic is the most significant, but Natural Cubic The planning method of Catmull-Rom Spline and Constrained Cubic can avoid this problem, among which Constrained Cubic can best inhibit overshooting, but the effect of reducing vibration is not as amazing as that of Natural Cubic. At present, the three cubic planning methods only support all Frame actions, that is, they cannot contain Actions other than Frames, if there are other Actions will automatically degenerate back to Linear, please pay more attention to their use.
  2.  IMU Compensation Range: Set the effective angle of the IMU compensation function (0~180 degrees, 0 means to turn off the compensation function), only within the angle of (-set ~+set value), the IMU will generate the compensation value, this function can set the effective range of compensation, if some actions do not need the compensation function, it can also be set to 0 to turn off the compensation.

The resulting program is of two types, and it is burned in slightly different ways.

86ME19_program.png

In addition to burning the ino program into 86Duino, you also need to put the generated configuration folder into the root directory of the 86Duino SD card (making 86Duino SD card) in order to execute it correctly. Generate 86Duino Sketch (All in One) will only produce one ino program, as long as the resulting program is burned into 86Duino.

  1. This block is used to modify the details of each different action in the Action List, such as the angle of the motor in each frame. To demonstrate how to do this in detail, we will illustrate it below with a more complete example of use.

Examples of use

This example hopes to let users understand the process of 86ME, and will use 86ME as a hexapod robot composed of three servo motors. These six are enough for one 86Duino Zero and three DMP_RS0263 as the main body, and the left, center, and right feet correspond to the 11th, 43rd, and 44th feet of the 86Duino, respectively.

86ME_hexapod.png

Steps1:

86ME19_step1.png

  1. Double-click the left 86ME.exe in the 86ME folder.
  2. Select –auto– to automatically connect to the COM port and press the Start button.

Step 2:

86ME191_step2.png

  1. Click New Project to add a new project, and the Robot Configuration window will pop up.
  2. Set the 86Duino Board to 86Duino Zero, which is the 86Duino model for this example, which has no IMU and is therefore set to None.
  3. Set the 11, 43, and 44 pins as the motor DMP_RS0263 servo motor, and the offset, homeframe, and Max&min here can be set according to the user's needs. The IMU compensation aspect is set to no compensation.
  4. Press the OK button to complete the setting.

Step 3:

86ME19_step3.png

  1. Once the project is created, you can see that the "+" button lights up, and we can use this button to add a new action, pressing the "+" button
  2. The Create a New Motion window pops up, enter the name of the action you want to add in the Motion Name field, in this case right.
  3. Press "OK" to complete the creation of the action

Step 4:

86ME19_step4.png

Right-click -> add action at the first field in the blank space below the Action List to select an Action to add an action to the action bar.
There are nine types of Actions, and their functions are described as follows:

Frame

86ME19_addframe.png

After selecting Frame, you can adjust the three motors that were originally set, and several functions will be turned on for users to adjust.

  1. Ticking Sync will make the robot immediately respond to the currently set value, and moving the following reels or changing the numbers while checking Sync will make the robot react instantly. The puller next to Sync can adjust the speed at which the motor rotates when Sync.
  2. The Free Motors button releases all motors that are in the output state and no longer outputs.
  3. Capture, used to read the angle of the current motor, the currently supported motors are Kondo, Hitec, Futaba three series, please be especially careful when using, because the Capture function will release all the motors first, if the robot is not supported well, the robot may fall.
  4. Play Time is how many milliseconds it will take to move to the currently set motor angle, and you can set it by entering the number directly, if it is set to 0, the action will be skipped, so please remember to set the Play Time.
  5. Set the value of the PWM signal to be transmitted to the motor, which can be set by pulling the reel or by entering the value. There is a circular button on the far right, which is used to decide whether the motor wants to be synced or not, by default, all motors will rotate according to the target PWM value given when they are synced, and it will be displayed as a green "ON", when this button is clicked, the picture will change to a red "OFF", and will stop the motor from output, this function can make the motor that does not need to be edited at the moment rest, in order to avoid burning out due to long-term output.

Delay

86ME19_adddelay.png

The user can set the Delay, and the delay here is simply stagnant, and will not allow the robot to have any action.

 

Flag & Goto

  • Goto and Flag allow users to test actions in a looping fashion without having to write a long list of frames. Flag only needs to be set to see if the flag in the Action List has been added to the name just set, and if so, it will be set successfully.

86ME19_addflag.png

  • In addition to setting the name, Goto must also set the number of loops and whether to trigger the number of times with Goto, or you can choose infinite jumps. The detailed behavior of Goto is that in the playback state, when it is executed to Goto, it will check whether it wants to execute this Goto, and if it is executed, it will look for the name of the target flag set by Goto, and then start executing the action from the Flag side again.

86ME19_addgoto.png

  1. Write the name of the target flag, and write the same test as the flag you just created.
  2. Set whether to execute or not.
  3. Set whether to execute Goto infinitely.
  4. Set the number of executions.

HomeFrame
Selecting HomeFrame includes a frame whose value is the initial position and cannot be changed, and the value of the HomeFrame can only be changed in Options -> Robot Configuration. This choice is to make it easier for the user to return to their home and to be able to identify where the return to home action will be performed.

86ME19_addhomeframe.png

GotoMotion
GotoMotion makes it easy to make the robot work for other motions, and only needs to easily configure the Target Motion and Method. GotoMotion, on the other hand, will only reflect in the resulting program, and currently does not support playback with 86ME for testing.

  1. Target Motion: The motion to be executed. When selecting the Target Motion, please pay special attention to the fact that 86ME currently does not support recursive calls, such as calling itself or calling each other. These situations may cause unexpected actions to occur. Please pay special attention!
  2. Method: It is divided into Call target motion and Jump to the target motion. Call target motion will continue to execute the remaining actions of the current motion after executing the target motion; Jump to the target motion will not return to the current motion.

86ME19_addgotomotion.png

If
If it provides the flexibility of action editing, it currently provides 50 variables and several practical system variables for users to use, as long as the set judgment conditions are true, it will go to the specified flag.

  1. Set the left sub-variables, "V0~V49" as variables that can be used by the user, and note that these variables are shared by each action. Other system variables are "NowTime" for the current time (ms) of 86Duino, "Random" for random numbers, "Analog0~Analog5" for the readings of A0~A5 on 86Duino, "AccX/Y/Z" for the three axes of the accelerometer X Y Z, and "GyroRoll" and "GyroPitch" for the current IMU compared to the Base Orientation Corresponding to the X axis, Pitch corresponds to the Y axis, "VKeyUp", "VKeyDown" and so on are virtual buttons, the value is 0 when the button is not depressed, and non-zero when it is depressed, and the virtual keyboard can correspond to the PS2 joystick.
  2. Set the judgment of the left and right variables, supporting equals, not equals, greater than equals, less than or equal to, greater than, and less than.
  3. Set the right sub-style, which is the same as the left sub-style, but the virtual button cannot be selected.
  4. If the right sub-formula is constant, you can choose this method and enter a number.
  5. Set the goal to jump to if is true.

86ME195_addif.png
 

Compute
Compute can be used to perform simple calculations and store values in specified variables (V0~V49).

  1. To set the variable of the left sub, you can select "V0~V49".
  2. Select the formula you want to use, the first formula can do operations on two variables, including addition, subtraction, multiplication, division, power, remainder, AND and OR. The second formula provides operations on a certain variable, including NOT, open root number, exp, logarithm, absolute value, negative sign, sin, cos. The third formula is a simple assignment. Fourth, the formula can specify constants.
  3. Once you've set the formula you choose, you're done.

86ME19_addcompute.png
 

Release
This action does not need to be set, it will act immediately after being executed, and can be used when the robot is about to encounter danger (such as falling) to avoid damage caused by excessive force in the motor instantly.

 

Step 5:
After editing the desired action, you can use the play, pause, and stop buttons to test, the general execution sequence is as shown in the figure below left, and if you are executing Goto, it is shown in the figure below right.

86ME19_mtest.png

Users can then choose to continue editing different items (go back to step 2) or take different actions (go back to step 3). Or if you choose to archive (File->>Save Project), a .rbm file will be generated, and the next time you use it (File-Load Project), you can continue to use the last saved project.

Add an image:
The purpose of this function is to make it easier for the user to correspond to the motor, so that the user does not have to recall the position of the motor corresponding to the robot every time he reads the item. Robot images can be added when adding a new project (File-> New Project) or modifying the project configuration (Options->Robot Configuration), and the Load Robot Picture button can be used to read PNG, JPG, GIF files as robot pictures. Once it is read, it cannot be removed, and once set, the Frame type action in the Action List can allow the motor to move freely to achieve the effect of corresponding to the motor and the robot part.

86ME19_picmode.png

If you save an image after reading it, the stored .rbm file will remember the path of the image on your computer, so if the location of the image is changed or removed, it may not be found the next time you read the project, please pay attention to it!

 

Original code

86ME is an open source action editor, the source code is published on GitHub, welcome interested friends to download or share. This project is built in Windows 7/10 + Visual Studio 2013 Community Edition.