Installation¶
This chapter explains how to set up your robot cell in Mikado Control and obtain an executable system. You will also find information on how the properties of the system can later be adapted to your needs.
Overview¶
This overview lists the various components that make up the Mikado environment from a hardware and software perspective. The links and interfaces between the components are also shown schematically with the help of a diagram.
Hardware overview¶
The hardware setup of a typical Mikado system consists of the following hardware components. In order for all systems to communicate successfully with the Mikado controller, they must be set up accordingly on the controller. The Assistant and the Configuration files are available for setting up the individual components.
Mikado-Controller
Central component: Takes over robot, gripper and camera control
Object recognition, path planning, inverse kinematics, sequence control, fieldbus connection
Roboter
TCP/IP connection to Mikado controller
Depending on the manufacturer, the corresponding communication module is loaded with Cell
Robot controller must be configured depending on the manufacturer (e.g. as described in section Set up Mitsubishi Controller)
Gripper
CAD model of the mold (for collision checks)
Parameterization of the opening, IO control or separate driver
Either connected via robot IOs, TCP/IP or external IOs (or PLC)
Camera
CAD model (for collision checks)
Hand-eye calibration via Mikado surface
Selection: Real, file camera or simulated
TCP/IP connection to Mikado controller
PLC / control system
Interface to PLC or external systems
Fieldbus connection to Mikado controller, e.g. via Profinet (may require optional interface module in the Mikado controller)
Control from outside (start sequences)
Data exchange / results
Overview of hardware components with interfaces¶
Software overview¶
The Mikado system can be divided into five different software modules. These components also work together, which is shown in the following graphic.
Mikado (Use)
User and configuration interface
Mikado Simulator (Simulation)
Replace real camera with file camera / virtual camera
Filling crates with physics simulation
Test gripper concept
Simulates stereo images of filled boxes
Mikado Assistant (Create a new cell)
Create robot cell
Modeling grippers
Scripts and own extensions (Extending Mikado Control)
Own Halcon scripts
Adapter for fieldbus connection
Other options such as JavaScript and Python
Ensenso NxView (Ensenso Manual)
Configure and test 3D camera
Create file cameras
Export configuration for Mikado
Overview of software components with interfaces¶
Integration procedure (step-by-step instructions)¶
A compact step-by-step guide that can be used as a guide for new integrations is listed below. The ‘Tools’ column contains notes and links to the sections of the manual that are most important for this step.
Step |
Designation |
Tools |
|---|---|---|
1 |
Set up network adapter |
|
2 |
Create and customize cell |
|
3 |
Integrate gripper |
|
4 |
Integrate robot and camera |
|
5 |
Create camera configuration(s) |
|
6 |
Hand-eye calibration |
Mikado calibration and calibration plate |
7 |
Determine the TCP offset of the gripper |
Calibrate TCP and calibration plate |
8 |
Define scene, product, handles and program sequence |
|
9 |
Optimization and testing |
Mikado GUI und ggf. Mikado Simulator |
10 |
Optional: Set up interface |
Konfigurations-Backup¶
A minimal backup at file system level includes the folder /home/mikado/mikado and contains all system-specific settings (the included folder /logs is not required).
Create a new cell¶
The Mikado Assistant is available to create a new cell. To start it, open the program menu (K at the bottom left) or press the Super/Windows key, type Assist… and click on the Mikado Assistant starter found. The Assistant then allows you to open existing cells as well as create new cells. The created cells then contain:
Ready-linked interfaces for a selected robot, gripper and camera type
Model for collision testing
Default settings for Mikado parameters
Create new Mikado Control cell¶
After starting the Assistant, click on New Control Cell. In the following selection menu, the cell can be roughly pre-modeled in just a few steps and the important settings for the robot and gripper type can be made. Once the model has been created, it can then be adapted precisely to customer requirements using the editor in the Assistant. When selecting parameters, please note that the cell name, robot and gripper type cannot be changed afterwards.
Hint
The poses are always calculated in the Mikado program in the world coordinate system. The world coordinate system is set to that of the robot by Mikado standard. This has the advantage that the same coordinates can be used in both the Teach Panel and the Mikado program. If you want an independent coordinate system, e.g. for overhead robot assembly, you must switch to Advanced mode (in the visualization tab Configuration, Advanced mode). The setting option World identical to robot coordinate system then appears, which can be set to false.
Screenshot Assistant overview cell creation¶
Customize an existing cell¶
An existing cell has a large number of global parameters that make it configurable.
Speed settings¶
For each joint of the robot, it must be defined how far it may be moved, how fast it may be moved and how much it may be accelerated. Four limit values are defined for each joint:
max_position: maximum position of the joint in rad
min_position: minimum position of the joint in rad
max_velocity: maximum travel speed of the joint in rad/s
max_acceleration: maximum acceleration of the joint in rad/s^2
The meaning of the last two values is shown in the figure below.
Meaning of maximum speed and acceleration¶
The travel speed of the robot when controlled by Mikado depends on various factors.
Absolute values¶
First of all, each robot joint has physical limits that must not be exceeded. The position and speed limits are usually specified by the manufacturer. These manufacturer specifications are stored in the Urdf of the robot used, which can be found in the installation directory:
/opt/isys-vision/mikado/share/<robot_model>_support/urdf/<robot_model>_macro.xacro
The respective limit values for position and speed are defined in the joints (see Joints) of each robot link in the following form:
<limit lower="${radians(-120)}" upper="${radians(120)}" effort="0" velocity="${radians(623)}" />
It is noticeable that there is no value for the gradient of the acceleration ramp. This is due to the fact that the maximum permissible acceleration is heavily dependent on the weight of the gripper used and the gripped part. Therefore, there are no universally valid manufacturer specifications for this. However, Mikado requires this value to calculate the trajectory points, which is why a maximum acceleration of 1 rad/s^2 is assumed as standard. This value is relatively low and must be increased incrementally until the desired cycle time is reached or the robot throws an error.
Mikado provides the configuration file joint_limits.yaml to make it easy to set the four limit values.
The absolute values for max_position, min_position, max_velocity and max_acceleration can be set here.
Note
The values defined in joint_limits.yaml for min_position, max_position and max_velocity overwrite the corresponding values in the URDF, regardless of whether they are larger or smaller.
Relative values¶
Typically, the speed of a robot is set on the teach panel using a scaling factor. This scaling factor also appears in Mikado and can be set in the configuration file manipulator.yaml:
velocity_scalingis multiplied by the applicable, absolute max_velocity.Acceleration_scaling is multiplied by the applicable absolute max_acceleration.
These two scalings are permanently defined in manipulator.yaml, but can also be changed temporarily at Mikado runtime. For some robots (e.g. Mitsubishi) this is possible under Tools/Robots. A temporary change is always possible by means of a JavaScript task using setRobotVelocityScaling or setRobotAccelerationScaling.
Different behavior with different robots¶
If a robot controller receives a sequence of trajectory points (e.g. a path planned by Mikado), this is processed piece by piece. However, some robot controllers (e.g. Fanuc) have a limited planning horizon. Accordingly, only a limited number of subsequent trajectory points are considered when moving to the next point. The safety-relevant assumption is made that the last point considered corresponds to the end point of the path. Typically, the robot must come to a standstill at the end point of the path. For paths with closely spaced trajectory points, this means that the maximum speed is never increased.
Mikado’s free path planner generates a large number of trajectory points to ensure that no collisions occur. In combination with a controller that could also stop at every point approached, this leads to a very slow ride. Due to this cause, nothing can be changed here via the scaling factors. However, the use of the free path planner can be avoided by adding suitable intermediate poses. The direct path (in the joint space) between the individual intermediate poses must be collision-free. Otherwise, the path planner is used again. The following illustration shows an example of an intermediate pose inserted between the start and end pose.
Intermediate pose inserted as an example to avoid the use of the free path planner¶
Note
If the robot moves very slowly during freely planned movements, you can avoid activating the free path planner by adding suitable intermediate poses.
The following links refer to robot-specific speed tuning:
Kuka Roboter: |
|
Universal Robots: |
Configuration files¶
The “config/” folder contains a number of files for setting interface properties, as well as for parameterizing the object search and path planning. Of particular interest are access_control.yaml, mikado.yaml and status.yaml.
access_control.yaml¶
enabled: (true/false) specifies whether simple access control should be enabled. A password must then be entered for all pages of the interface on which changes can be made. The effect is also described in chapter Password protection.
password: (string) Defines the password. Obviously, you do not need to be particularly technically adept to find out this password. You should therefore not use a “valuable” password and always bear in mind that this is more of a hint than real security.
calibration.yaml¶
Some parameters for automatic calibration or for generating new recording poses can be set in this file:
targetLink: Name of the link that is used to generate the robot poses. (Optional, default: wrist of the robot)
max_translation_before_precalib: Maximum translation of the generated poses to the initial pose before a precalibration was performed [in meters].
max_translation_after_precalib: Maximum translation of the generated poses to the initial pose after a precalibration has been performed [in meters].
rotation_before_precalib: Rotation of generated poses to the initial pose before a precalibration was performed [in radians].
rotation_after_precalib: Rotation of generated poses to the initial pose after a precalibration has been performed [in radians].
check_pose_visibility: (true/false) This can be used to explicitly deactivate the visibility test after precalibration (optional, default: true)
max_failed_moves: A randomly generated pose can occasionally not be reached by the robot (e.g. in case of collision or no inverse kinematics found). This limit value defines the maximum number of attempts at which the calibration process is aborted.
max_failed_visible: After a successful pre-calibration, each generated pose is checked to see whether the calibration pattern will be in the field of view. This limit value defines the maximum number of attempts the calibration may start per pose. If no pose is found after this, the calibration is aborted.
Hint
The values after pre-calibration should allow more leeway to achieve a better final calibration result.
camera_X.yaml¶
A parameter file is created for each camera. This contains:
camera_serial: The camera serial number used to establish communication.
fixed_camera: Determines whether the camera is treated as fixed or movable on the robot arm
camera_config: Path to the configuration file loaded at startup (see Camera configuration), for example
cellname:config/150001.json. File cameras do not use this.mono_cameras (optional): If you want to use an additional monocular camera, it can be integrated here (e.g. for use with Halcon Scripts)
serial_no: Serial number of the monocular camera (e.g.
4101230815)config: Path to the configuration file for this monocular camera loaded at startup, e.g.
cellname:/config/4101230815.json
Warning
File cameras in a *.zip are not supported and must be unpacked into a folder.
gripper.yaml¶
In the configuration file gripper.yaml, the gripper type is specified at the top with the parameter type. There are the following categories:
type:
None: An immobile “gripper” with no other special features
Magnetic: a magnetic gripper
Vacuum: a vacuum gripper, here the vacuum is already switched during the approach movement to avoid displacement by the vacuum cup (especially with bellows suction cups).
ParallelTwoStates: a simple pneumatic gripper with open and closed states. Can be used for both internal and external grippers. Of course, it also works with simple electric grippers.
ParallelPositionControl: an electric gripper that can be controlled to any position.
ParallelForceControl: an electric gripper with force measurement and force control.
The remaining parameters are listed in the following table. Some parameters are optional depending on the gripper type and may therefore not be part of your configuration file. The Robot type column indicates for each parameter whether it exists for a specific robot type. The Gripper type column indicates whether a parameter exists for a specific gripper type. Here IO denotes grippers controlled by IOs, Finger denotes grippers with at least two fingers and WSG denotes grippers of the WSG series from Weiss.
Robot type |
Gripper type |
||
Outputs |
|||
open_hand_signal_number |
Signal number (IO number) with which the gripper can be switched to the open state |
alle |
IO |
open_low_active |
If the open state of the gripper is low-active, set this parameter to true |
Mitsubishi, Techman |
IO |
close_hand_signal_number |
Signal number (IO number) with which the gripper can be switched to the closed state |
alle |
IO |
close_low_active |
If the closed state of the gripper is low-active, set this parameter to true |
Mitsubishi, Techman |
IO |
Inputs |
|||
is_open_signal_number |
Signal number (IO number) at which the open status of the gripper is signaled |
Mitsubishi, Techman, UR |
IO |
is_open_low_active |
If the sensor used for the open state is low-active, set this parameter to true |
Mitsubishi, Techman, UR |
IO |
is_closed_signal_number |
Signal number (IO number) at which the closed state of the gripper is signaled |
Mitsubishi, Techman, UR |
IO |
is_closed_low_active |
If the sensor used for the closed state is low-active, set this parameter to true |
Mitsubishi, Techman, UR |
IO |
Finger configuration |
|||
joint_finger_name |
Name of the joint of the leading gripper finger (e.g. ‘finger_left’). Can be set to ‘’ if gripper has no movable joints. |
alle |
Fingers |
joint_value_open |
[1] Value of the joint in meters when the gripper is closed (e.g. 0.0). This value is used to control electric grippers with linear axes, for example. |
alle |
Fingers |
joint_value_closed |
[1] Value of the joint in meters when the gripper is open (e.g. 0.07). |
alle |
Fingers |
Schedule |
|||
wait_time_before_pick |
Waiting time in seconds at the transition pose of a gripping process if the gripper state for the grip needs to be changed |
alle |
alle |
wait_time_pick |
Waiting time in seconds directly after the gripper has gripped a part |
alle |
alle |
finger_state_publish_rate |
Update rate of the finger (or gripper) joint in Hz |
all except UR, Techman |
alle |
WSG |
|||
speed |
Speed of the gripper axis in m/s |
alle |
WSG |
acceleration |
Acceleration of the gripper axis in m/s² |
alle |
WSG |
force |
Gripping force of the gripper axis in Newtons |
alle |
WSG |
joint_limits.yaml¶
This file defines the limits for the individual joints. The following parameters can be specified:
min_position minimum Position
max_position maximum position (both in radians, i.e. π (pi) or 3.141 corresponds to 180°)
has_velocity_limits (true/false) speed limits are available
max_velocity maximum speed (wheel/second)
has_acceleration_limits (true/false) acceleration limits are available
max_acceleration maximum acceleration (wheel/second²)
Unfortunately, the following restrictions apply:
we currently use a control system for some robot types that is based purely on trajectories (i.e. contains no speed or time components). The maximum speed and acceleration then results from the settings of the robot controller (or its performance).
At present, planners also do not take long acceleration ramps into account, for example. They optimize purely for the shortest route.
The values specified here overwrite the theoretical limits of the hardware as specified in the URDF/XACRO in the robot package. We also recommend setting joint limits on the robot controller and setting slightly tighter limits in joint_limits.yaml.
manipulator.yaml¶
simulated_robot: true/false Use simulated robot instead of connecting to the real robot
robot_ip: e.g. “192.168.2.1” Enter the set IP of the robot here
manufacturer: e.g. “Universal Robots” Manufacturer of the robot, activates any special functions in Mikado Control.
model: e.g. “UR5” so far only for documentation purposes
velocity_scaling: (0.01-1.0) Scaling factor to the maximum speed defined in the URDF. Can be temporarily adjusted in the interface under Tools/Robots.
max_velocity_scaling: (0.01-1.0) Upper limit for the temporary value in the surface
Acceleration_scaling: (0.01-1.0) Scaling factor to the maximum acceleration defined in the URDF. Can also be temporarily adjusted in the interface.
max_acceleration_scaling: (0.01-1.0) Upper limit for the temporary value in the surface
mikado.yaml¶
This file defines some properties of the interface:
fullscreen: true/false Fullscreen mode active
separate_windows: false Visualization and user interface in separate windows, distributed across multiple monitors
program_file_name: “project:programs/Motek.yaml” a program sequence that is to be loaded directly (optional)
product_list_file_name: “project:products/T-Stueck_productList.yaml” a product list that is loaded directly (optional)
scene_objects_file_name: “project:scenes/EnvObjects.yaml” a file with the scene objects (optional)
language: “en” The language of the interface. Currently “de” or “en”. If no language is specified, the system language is used.
debug_qml: true/false In Qml debug mode, the program interface and in particular the system-specific pages can be reloaded without restarting the program. A new “Qml” tab appears below the visualization for this purpose.
The prefix project: means that the information is relative to the project directory, i.e. the directory of the robot cell.
object_recognition.yaml¶
This file contains parameters for object recognition that apply to all products. Some parameters cannot be influenced via the Mikado interface, as these must already be set at system startup. The following parameters must be set:
- voxel_size
Voxel size. A 3D point is considered a “voxel” in collision planning, i.e. a small cube. The side length of such a cube can be defined here. [mm] Default: 2.0
Note
The voxel size (octomap) displayed in the view can be changed in sensor_manager.launch.xml.
- dilation_radius
Dilation radius object search. If an object is found, all 3D points around this object are cut out for the object search. The maximum distance within which the points are removed can be set here. [Number of voxels] Default: 0
- dilation_radius_object_cutting
Dilation radius when cutting out matches. If an object is found, all points around this object are cut out for collision planning. The maximum distance within which the points are removed can be set here. Should be larger than the dilation radius of the object search. [Number of voxels] Default: 2
dilation_radius_object_cutting: 4. For a voxel size of 3 mm, this results in a cutout of 4*3 mm = 12 mm.¶
dilation_radius_object_cutting: 8. For a voxel size of 3 mm, this results in a cutout of 8*3 mm = 24 mm.¶
- cuda_enabled
Use CUDA. If the Mikado controller is equipped with an NVIDIA graphics card, stereo matching can be accelerated using CUDA. [bool] Default: true
- useFloat16
Accelerates the SCM and SGM calculations (Matching Method/ComputeDisparityMap) if the GPU supports half arithmetic. [bool] Default: true
- halcon_available
Halcon available. If no Halcon license is available, all Halcon-dependent features can be deactivated here. [bool] Default: false
Halcon specific parameters:
- relative_sampling_distance
Relative sampling distance (products). Sampling distance of the surface model (product) relative to its diameter. [0.0 - 1.0] Default 0.0375
- pose_ref_rel_sampling_distance
Relative sampling distance for refinement (products). Sampling distance of the surface model (product) relative to its diameter for the refinement step of the object search. Should be selected larger than the parameter Relative sampling distance (products) [0.0 - 1.0] Default 0.015
ompl_planning.yaml¶
Parameters for the available path planning algorithms can be adjusted here. Mikado Control currently uses “RRTConnect” by default and this cannot be switched.
pick_search.yaml¶
Some of the following terms are explained in more detail in section Handle inspection.
- allow_OO_collisions_during_extraction:
Activate/deactivate object/octomap collisions
- allow_max_depth_collisions:
Grasped object may collide with other objects during the removal (extract) movement
- max_allowed_collision_depth:
Maximum “depth” of a permitted collision
- specific_max_allowed_collision_depths:
Maximum “depth” of a permitted collision for two specific products/objects
- pick_selection_order:
Prioritization of the handles can be influenced here by changing the order of the list elements
score_bin_size: Size of the grouping intervals by score
z_bin_size: Size of the grouping intervals by z-value in world coordinates
- search_fn_blacklist:
Switch off individual extract or retract functions
- allow_skipping_new_object_search:
Skip 3D matching for new objects if there are enough possible handles available by reusing previous finds. The following criteria must be met for the object search not to be triggered:
min_valid_picks: Minimum number of valid picks in total
min_valid_picks_per_object: Number of handles that must be found on an object for the object to be classified as “grabbable”
min_valid_objects: Minimum number of “tangible” objects
- object_recognition_max_translation_diff:
Reuse of finds: Maximum distance of the previous find for it to be classified as the same find
- object_recognition_max_rotation_diff:
Reuse of finds: Maximum rotation to the previous find so that it is classified as the same find
- interpolation_max_translation_diff:
Maximum increment of two robot states in interpolated movements (distance)
- interpolation_max_rotation_diff:
Maximum increment of two robot states in interpolated movements (rotation)
- pick_search_timeout_in_seconds:
If a task is executed in the Mikado process that has to wait for the result of the handle search (e.g. the task ‘Grab part’), the maximum calculation time defined here applies. If this time is exceeded without a valid handle being found, the process terminates with an error.
sensors_ensenso.yaml¶
This is where you configure how the point cloud recorded by the camera is to be taken into account for path planning. In the default setting we use, only the last image is taken into account and known geometries such as the robot arm (“selfie”) are not filtered out. The products found, however, are filtered so that this mode is well suited for use in a crate, for example. If occupancy_map_monitor/PointCloudOctomapUpdater is used for sensor_plugin instead, each point cloud is interpreted as an “update” of the previous scene. In this way, a collision geometry of the cell is created over several images with a moving camera. (This cannot yet be saved and is therefore only mentioned here as a nice gimmick).
status.yaml¶
This file defines which components (in addition to some fixed components for cameras and the Mikado Control license) make up the system status. Typically, there will be an entry for the robot, one or more for the cameras and possibly another for fieldbus components such as ProfiNet. Here is an example for a robot and a ProfiNet component:
status:
- name: Robot
type: RobotStatus
topic: robot_status
- name: Profinet
type: RosDiagnosticStatus
topic: profinet/status
enabled_if_rosparam: /profinet
The system can easily be supplemented with your own components, e.g. for specific hardware or software. All you have to do is regularly (< 10s) publish a message of the type RosDiagnosticStatus on a topic of your choice (google ros publisher or ask us for a sample program).
view_settings.yaml¶
A complete standard configuration of the views of each 3D visualization in Mikado. For example, the position and orientation of the scene camera are saved here. Information on using the save function for the view settings can be found in the Navigation chapter.
world.srdf¶
This file contains some additional information on the structure of the cell that cannot be specified in the Cell geometry. Among other things, all exceptions to collision monitoring are listed here. By default, Mikado allows collisions for the following categories:
all objects attached to tool0 may collide with each other,
all objects attached to workcell_base may collide with each other,
all neighboring links of the robot may collide in pairs and
the group of all objects attached to tool0 may collide with Link_5 and Link_6 of the robot.
This speeds up the system, e.g. with stationary objects, but may also be necessary if, for example, the collision geometries of two neighboring sections of the robot constantly or temporarily overlap minimally. Further exceptions can be permitted via the “Add new exception” field. To delete a user-defined exception, select the corresponding entry in the list and press the “Delete” button. Only user-defined exceptions can be deleted.
Note
If a new object is attached directly to a robot link, Mikado does not generate an automatic exception to the collision check, as none of the above categories cover this case. If the new object and parent (robot) link overlap, the robot can no longer be moved by Mikado because a collision has been detected (parent object and the new object). In this case, the exception must be created manually.
Warning
The collision check between the parts listed here is completely deactivated. Therefore, only deactivate the collision check for parts that cannot collide in reality. Careless deactivation can result in serious material damage. Therefore, make sure that deactivated collisions cannot occur, for example via maximum axis angles (see URDF)!
Here are two examples:
<disable_collisions link1="base_link" link2="link_1" reason="Adjacent" />
<disable_collisions link1="base_link" link2="pane_back" reason="Never" />
The collision between “base_link” (the base of the robot) and “link_1” (the first segment of the robot) is deactivated, as they touch slightly and are only connected by a vertical axis of rotation. They can therefore never be brought into an actual collision regardless of robot movements. The collision between “base_link” and “pane_back” (rear wall of the cell) is deactivated as both are fixed.
The entries for the gripper_group and the disable_collisions table are also interesting. The gripper_group determines which parts of the gripper are shown in the gripper point editor. Here is an example from the template:
<group name="gripper_group">
<link name="gripper_frame" />
<link name="camera_frame" />
<link name="gripper_cables_frame" />
<link name="gripper_tcp" />
</group>
Launchfiles¶
The individual software components of a Mikado system are started via so-called launch files. These are XML files with a relatively easy-to-read structure. If you have used the Mikado Assistant, no changes to the launch files should be necessary. An exception is, for example, changing the robot type at a later date. Each cell has a file launch/main.launch which describes the actual launch process of the system. Optional arguments can be passed to this file, e.g. “sim:=true” to start Mikado Control in simulation mode. main.launch is typically called via the bash script “zellname.bash”, which in turn is started via “zellname.desktop”.
The following description of the possible entries in a launch file is deliberately brief; for further information, please refer to the ROS wiki (http://wiki.ros.org/roslaunch/XML).
<arg> a parameter name within the launch file that can be specified when the launch file is called; if it is not specified, default is used. Is then used later via “$(arg name)” either in case distinctions (if/unless) or as a value.
<group> can be used to group <node>s and parameters, either to make a complete block optional via if/unless or to move the nodes and parameters into a namespace.
<include> loads another launch file; its parameters can also be set via <arg>
<node> starts a program under the unique name name, it originates from the package pkg and has the file name type. If the program terminates as planned or due to a crash, it can be restarted using respawn=”true “. However, if required=”true “ is specified, the entire launch file will be terminated in this case.
<param> sets a single parameter on the central parameter tree.
<rosparam> is usually used to load an entire configuration file (.yaml) onto the parameter tree. You can also use ns to write to a “subfolder” of the tree.
sensor_manager.launch.xml¶
The resolution of the octomap displayed can be set here, which can be particularly relevant for systems without a high-performance graphics card. The octomap resolution displayed can be adjusted in the following line:
<param type="double" name="octomap_resolution" value="0.001"/>
The following screenshots show the difference between a 1 mm resolution and a 4 mm resolution.
octomap_resolution = 0.001¶ |
octomap_resolution = 0.004¶ |
Note
The resolution of the octomap has nothing in common with the voxel size defined in object_recognition.yaml.
Cell geometry¶
The program-independent geometry (and kinematics) of the robot cell is described via a file in the Unified Robot Description Format (URDF). This format is an XML dialect and can be edited with any text editor.
Mikado organizes the URDF description of the robot cell in a total of five different files: Global, Cell, Gripper, Robot and Camera, whereby changes are only possible in the first three files mentioned. The modifiable URDF files are stored in the urdf subdirectory of the project directory. This subdivision helps to keep the individual modules of a robot cell clear and easy to replace.
The figure below shows the hierarchical structure of the file structure. The Global file integrates the other four files. The J (for joint/joint) indicates the file in which the geometric connection between the corresponding modules is defined.
Organization of the URDF files¶
The following table provides a brief overview of the intended content of the individual files:
Global |
The global area connects the robot, the cell and the gripper. It can be used to add further components to the robot. |
Cell |
All objects that relate to the static work cell are defined in the Work cell section. Only add stationary objects here that are not connected to the robot. |
Gripper |
All objects that are connected to the gripper are defined in the Gripper section. Only add objects here that are mounted directly or indirectly on the flange of the robot. The tool center point (gripper_tcp), which is decisive for the grip definition, is also defined here. |
Roboter |
The geometry of the robot is defined here. The content of this file is defined by the manufacturer and cannot be changed. |
Camera |
The geometry of the camera is defined here. The content of this file is defined by Optonic and cannot be changed. |
With the Assistant, Mikado offers various tools to modify the cell geometry in the most user-friendly way possible. In the following a short introduction to URDF is given and the possibilities to structure it with XACRO are shown. Furthermore, the URDF Insert Help and the URDF editing help are introduced.
URDF¶
The Unified Robot Description Format (URDF) description of a robot cell begins with an enclosing <robot> tag. This has an attribute name, which must match the tag in the associated world.srdf. This is followed by a series of <link> and <joint> tags. A <link> represents a node, an object or less abstractly e.g. the table/base plate of the cell. <link>s are connected to each other via <joint>s. These can be either fixed or movable and form a tree structure. We always start this with the root object <link name=”world_frame”/>. This must always exist and must not be renamed! The figure below shows an example cell described with URDF. The coordinate systems of the individual links are represented by the three-colored coordinate crosses with a corresponding white label. The joints represented by yellow arrows show how the individual links are connected to each other.
Visualization of a robot cell described with URDF¶
Links¶
A small example explains the structure of a link:
<link name="mein_link">
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<mesh filename="package://mein_projekt/meshes/mein_link.stl" />
</geometry>
<material name="Cyan">
<color rgba="0 1.0 1.0 1.0"/>
</material>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<cylinder radius="1" length="0.5"/>
</geometry>
</collision>
</link>
The “my_link” node consists of a CAD/mesh file that describes the visual appearance and has been colored in cyan/turquoise (the name is freely selectable, the RGBA values are decisive). Mesh files must be available either as STL (simple triangles, no color information) or as Collada (.dae, textures etc) and in meters. The visual geometry can be moved via <origin xyz=”0 0 0” rpy=”0 0 0” />, but it is clearer to move the CAD file appropriately (e.g. in Meshlab, SolidWorks, Blender, …). The simplest possible description should be used for the collision geometry, but it must always be the same size or larger than the actual physical geometry. A cylinder with a radius of one meter and a height of half a meter was simply used here. The origin is in the center of the cylinder. If the origin of a URDF primitive is shifted, it should be noted that this shift always takes place in the original coordinate system of the primitive. The following image illustrates the shifting of the origin of a URDF primitive.
Moving the origin of a URDF primitive¶
The primitives <box>, <cylinder>, <sphere> and CAD models <mesh> can be used for both visual and collision geometry:
<box size="0.1 0.2 0.3" />
<cylinder radius="0.1" size="0.2" />
<sphere radius="0.3" />
<mesh filename="package://mein_projekt/meshes/beispiel.dae" scale="0.001" />
It is quite possible to use multiple geometric objects in a link, but this should be avoided as it is insufficiently tested and therefore not officially supported. This applies to both collision geometries and visual geometries.
Joints¶
The individual links are connected to each other via joints. In the simplest case, this is a rigid connection:
<joint name="world_to_table" type="fixed">
<parent link="world_frame"/>
<child link="table_base"/>
<origin xyz="0.3 0 -0.5" rpy="0 0 0"/>
</joint>
This defines that a link with the name “table_base” is moved by 30cm in the x-direction and by -50cm in the z-direction. It should be noted that the shift specified in “<origin>” node is always interpreted in the coordinate system of the parent object. The following image illustrates the displacement in a joint.
The importance of displacement within a joint¶
Industrial robots typically have 6 axes of rotation, such an axis would then be described by:
<joint name="joint_3" type="revolute">
<origin xyz="0 0 0.310" rpy="0 0 0"/>
<parent link="link_2"/>
<child link="link_3"/>
<axis xyz="0 1 0"/>
<limit lower="${-16*deg_to_rad}" upper="${164*deg_to_rad}" velocity="${250*deg_to_rad}" effort="0" />
</joint>
The type “revolute” indicates that this is a rotation joint. Its origin has been shifted by 31cm from link2 and it is rotated around the y-axis. As the robots themselves are typically modeled by Optonic, the last entry <limit> is of particular interest here. lower specifies the minimum value that the joint can assume, upper the maximum. These values must be specified in radians/arc measure. To improve comprehensibility, XACRO has been used here to convert from degrees. The limits do not have to be symmetrical and often are not.
Warning
The limits should also always be set in the controller as Mikado Control is not safety-relevant. It is important to set the limits in the controller approx. 1° larger than in Mikado Control (3° for UR). If Mikado Control attempts to move to a position that is not permitted in the controller, this usually results in very unpleasant emergency braking that has to be acknowledged manually (for safety reasons). If the limits are set identically, this can still occur due to rounding errors.
velocity specifies the maximum achievable speed of the joint in radians per second. This should also be set slightly lower than the maximum speed configured in the controller. In principle, effort specifies the maximum force of the motor, but is not used in Mikado Control. The maximum acceleration can be configured via the file joint_limits.yaml. To avoid confusion, the same values should be specified there.
Linear joints are also used in grippers in particular, here is an example:
<joint name="finger_left" type="prismatic">
<parent link="gripper_frame"/>
<child link="finger_left_frame"/>
<origin xyz="0.0035 0 0.2045" rpy="${m_pi} 0 0"/>
<axis xyz="1 0 0"/>
<limit lower="0" upper="0.006" effort="${max_effort}" velocity="0.01" />
</joint>
Here, “prismatic” indicates a linear displacement, in this case along the x-axis. The limits now indicate meters instead of radians. Especially with a parallel gripper, you want to move both fingers together. There are so-called “mimic” joints (pantomime joints) for this purpose. The right finger could then be coupled to the left finger as follows:
<joint name="finger_right" type="prismatic">
<parent link="gripper_frame"/>
<child link="$finger_right_frame"/>
<origin xyz="-0.0035 0 0.2045" rpy="${m_pi} 0 ${m_pi}"/>
<axis xyz="1 0 0"/>
<limit lower="0" upper="0.006" effort="${max_effort}" velocity="0.01" />
<mimic joint="finger_left"/>
</joint>
The joint is therefore identical to the left finger except for an additional rotation of 180° around the z-axis. The <mimic> tag causes the position of the joint to be linked to that of “finger_left”. Optionally, a multiplier and an offset could also be applied to the value.
The official documentation for URDF can be found at http://wiki.ros.org/urdf/XML/model. However, not all tags and joint types mentioned there are officially supported by Mikado Control.
XACRO¶
If you open the urdf folder in Dolphin (file manager), you will notice that there are only files with the extension .xacro. XACRO stands for Xml Macro and is a tool for creating flexible and compact XML that is modular and does not constantly repeat itself. If you write the complete cell description including robots in a URDF file, it becomes quite large and it is cumbersome to change the size of the cell, for example. We therefore use a macro language that extends URDF with the option of defining variables, calculating values (e.g. degrees in radians) and integrating additional files. A pure URDF file is then automatically generated from this XACRO file in the launch file. To create a URDF file manually, use the command:
xacro --inorder datei.xacro > datei.urdf
This can be particularly helpful for testing a change. Now to some of the functions of XACRO:
Calculations¶
Variables and the basic arithmetic operations can be used:
<xacro:property name="diameter" value="4.3" />
<sphere radius="${0.5 * diameter}" />
Here, a sphere with a diameter of 4.3m is created by halving the diameter and using it as the radius. Some constants like pi are already defined and even arbitrary Python code can be used. Another example (but there is no circle tag in Mikado):
<xacro:property name="R" value="2" />
<xacro:property name="alpha" value="${30/180*pi}" />
<circle circumference="${2 * pi * R}" pos="${sin(alpha)} ${cos(alpha)}" />
It always makes sense to define a variable deg_to_rad and then use the much more intuitive degree values:
<xacro:property name="deg_to_rad" value="${1.0/180*pi}" />
URDF Insert Help¶
To facilitate the insertion of Urdf primitives, the Mikado Assistant offers insertion help. This can be displayed for the three Urdf pages Cell, Gripper and Global using the “Insert help” checkbox at the bottom left of the window. The following screenshot shows a completed Urdf input help:
Screenshot Assistant URDF Insert Help¶
In the example shown, a cuboid with the dimensions 100x150x50 mm is to be inserted at the bottom of the cell. To do this, the z-value of the origin is set to 25 mm using the “Offset” button in the “Object” box. As the cuboid in this example is positioned at an angle in the cell, the “Yaw” input field is set to -45°.
A cuboid should also be used as the collision model, but with slightly larger dimensions. This can be done in the “Collision model” box in the same way as the “Object” settings.
In the “Positioning” box, you can set which parent object the new object should be attached to. All objects currently contained in the cell are offered for selection via the drop-down menu. In this example, “base” is selected as the new cuboid is to stand on the floor. The “Offset” buttons can be used to set the relative displacement and rotation of the origins of the parent object and the new object.
The visualization on the right-hand side shows a preview of the new object. If the user presses the ‘Insert object’ button, the following code block is generated for our example and inserted into the Urdf editor on the left-hand side:
<link name='MeinLink'>
<visual>
<geometry>
<box size='0.1 0.15 0.05'/>
</geometry>
<material name=''>
<color rgba='0.255 0.412 0.882 1'/>
</material>
<origin xyz='0 0 0.025' rpy='0 0 -0.785398'/>
</visual>
<collision>
<geometry>
<box size='0.15 0.2 0.1'/>
</geometry>
<origin xyz='0 0 0.025' rpy='0 0 -0.785398'/>
</collision>
</link>
<joint name='table_top_to_MeinLink' type='fixed'>
<parent link='table_top' />
<child link='MeinLink' />
<origin xyz='0 -0.3 0' rpy='0 0 0'/>
</joint>
URDF editing help¶
The URDF editing help enables an exclusively graphically based modification of the cell geometry. The left-hand side of the screenshot below shows the tree structure of the URDF objects. A URDF object can be selected here. The selected object can then be modified using the mask on the right-hand side. Similar to URDF Insert Help, the visual and collision model as well as the positioning of the object can be set using the corresponding buttons. An object can also be renamed or its color changed.
Screenshot Assistant editing help¶
Changes to a URDF object must be confirmed by pressing the “Apply” button. If the button is not pressed, the changes to the current input mask will be lost when you select another object or leave the page. To save the changes permanently, press the “Save” button at the bottom right.
In the example shown, the different objects have different font positions and symbols. The following table provides a brief overview of their meaning.
Upright font |
The object has a collision geometry. |
slanted font |
The object is virtual. It has no collision geometry. Please note that it can still have a visual geometry. |
|
The object cannot be edited. There may be various reasons for this:
- Das Objekt wird aus einem anderem Ros-Paket eingebunden.
- Die Editier-Funktion ist durch das Setzen des Attributs
<link name="example" editable="false"> manuell gesperrt.- Das Objekt wird durch ein xacro-Makro erzeugt.
|
|
The object is hidden in the simplified view. The configuration of the simplified view can be found in the menu under Hide. |
Mikado Key-Links¶
The following Urdf objects are required by Mikado:
gripper_tcpGripping point of the gripper. Is used for the grip definition and the gripping process. A gripping pose is always approached in the positive z-direction of the coordinate system of this object.tool0Robot flange. Is set in the respective robot package. This object cannot be changed.camera_left_lens_framePosition of the left mono camera. Only used by the Mikado simulator.
Directory structure¶
In general, a Mikado system consists of a general system-unspecific part that is already pre-installed (as a Debian package) and the specific description of your cell. Several cells can be set up side by side on one PC, but only one application should be started at a time. Additional cells, even with other robot types, for example, can be used to simulate a planned new system.
All existing cells can be found in the mikado/cells folder in the /home/mikado/mikado/cells folder as subfolders. A cell with the name example cell has the following structure:
config/contains configuration files for the interface as well as for object search and path planning parameterslaunch/contains information on which software components the system is made up of and how these are to be startedmasks/contains masks (images), e.g. for searching for scene objects via their contourmeshes/contains 3D model data of the products, crates, obstacles etc. used.products/contains the product descriptions and product listsprograms/contains the actual program sequence as it was created in the program editorscenes/contains descriptions of the moving objects in the cell, i.e. boxes, obstacles and ROIsurdf/contains the description of the unchangeable components of the cell, i.e. robot, gripper, safety fence, …package.xmldefines the name of the cell, for the sake of simplicity it should be the same as the folder name
This structure should be adhered to in order to guarantee Mikado’s ability to run.
Mikado Select/Control assembly guideline¶
Mikado Controller Hardware¶
The Mikado Control controller is available in a compact and a larger, more powerful 19-inch version. Both controllers should be installed in a protected environment, e.g. in a control cabinet.
19-inch variant¶
The powerful version of the Mikado controller is supplied as a 19-inch rack with 4 U (approx. 18 cm high). The power switch and two USB ports are located on the front behind a lockable flap. All other connections are located on the rear. Power is also supplied via a 110-240 V power cable. Mouse and keyboard can be connected via USB. There are 3x DisplayPort, HDMI and DVI connections for monitors. Cameras and robots can be connected via four Gigabit network ports on a plug-in card. A further onboard Gigabit port is available for remote access or integration into the overall system. The Hilscher cifX card can also be used here for communication with the PLC etc.
Compact version¶
The dimensions of the controller are approx. 250 x 160 x 160 mm, but there should still be approx. 5 cm space to the front for the cables. Mounting is possible using the supplied plates with a hole pattern of 270 x 135 mm. Power is supplied via a 110-240 V power cable, keyboard, mouse and screens (DVI/HDMI) can be connected via the usual connections. Two Gigabit Ethernet ports are available for the connection to the camera and robot. The plug-in card is a Hilscher cifX card that can be used for ProfiNet integration, for example. Alternatively, a 4-port network card can also be installed.
Connecting the Ensenso cameras¶
Only a brief summary can be given here, further details can be found in the Ensenso Manual.
N-Series¶
The compact cameras in the N series can be connected via PoE (Power over Ethernet) as well as via a separate power supply (24 V). In both cases, data is transmitted via Gigabit Ethernet. This requires a sufficiently shielded cable, at least Cat 5e. Unfortunately, many robots are only equipped with a 100 MBit cable without sufficient shielding. With transmission times in the range of seconds, a minimum cycle time can no longer be achieved.
The mounting should be done with three M4 screws in a triangular arrangement to avoid distortion of the camera body. The drilling pattern and the dimensions of the camera can be found here in the Ensenso manual.
X-Series¶
The X series is always powered via an external 24 V power supply unit. Power supply via PoE is not possible here. As the projector consumes a relatively high amount of power during recording, a cable with a larger cable diameter should be used for any extensions. The mono cameras are connected to the projector and supplied with 12 V from it.
There are two options for data transmission with the X series:
The two cameras can be connected to the projector’s integrated switch. The switch in turn is connected directly to the Mikado controller.
Alternatively, only one of the two mono cameras can be connected to the switch. The other camera and the switch are then connected directly to the Mikado controller.
The second variant doubles the data transfer rate and the recording time can be reduced accordingly. The projector is mounted with four M4 screws, the drilling pattern and dimensions can be found here in the Ensenso manual.
Fastening the calibration plate¶
For hand-eye calibration (HAK), an Ensenso calibration pattern must be attached to the flange or gripper in the case of a stationary camera. With a moving camera, however, this can simply be placed in the cell.
Stationary camera¶
In principle, the position and axis angle of the robot during calibration should be as close as possible to a typical gripping position. As can be seen in the figure below, axis 6, i.e. also the flange, should be aligned in the negative Z direction and the calibration plate (pattern) in the direction of the camera. Furthermore, the mounting of the calibration plate should be sufficiently stable and not move, but the exact position is irrelevant. The boom for the camera must be long enough so that the camera has a good view of the entire pattern or at least the majority of it. Last but not least, an uncomplicated conversion is helpful so that recalibration can be carried out quickly and easily at any time.
The simplest design is an elongated plate with drill holes for the robot flange and a glued or clamped calibration plate next to the flange. The disadvantage here is the need to dismantle the gripper. The pattern must not be drilled into, as there is a risk that it will warp. The pattern is a measuring instrument and should also be protected from scratches after use.
If the gripper has a stable form fit, a part with a glued pattern can also be gripped. Attaching a section of top-hat rail to the side of the gripper and gluing a corresponding counterpart to the pattern has also proven successful.
Hint
Provide a backstop for the ceramic patches in case the gripper is opened unintentionally.
Example of attaching a calibration plate to the robot flange for a stationary camera¶
Moving camera¶
With a mobile camera attached to the robot flange or gripper, the pattern can be placed anywhere in the workspace. It is best to place it in the center of the subsequent pick-up area, e.g. on or in the parts box. The pattern does not need to be fixed in place, it simply needs to rest in a non-slip position during the robot movements during the calibration process.
Gripper integration¶
This chapter on gripper integration shows the options offered by Mikado Control for integrating your gripper. Supported gripper types and how you can integrate and configure the CAD model of the gripper are explained.
Gripper types¶
Mikado Control supports several gripper types such as parallel, vacuum, magnetic or electric grippers. A list and description of the gripper categories can be found in section gripper.yaml.
Integrate gripper¶
As soon as you have attached a gripper to the robot, you can add it to the robot model. You will need a suitable CAD model of the gripper for this.
Integrated gripper in the Mikado visualization (example)¶
Modify gripper¶
If you only want to make minor changes to the gripper model of an already integrated system, you can simply modify the integrated STL file with a CAD tool of your choice. The Mikado Assistant gives you access to the URDF file that defines your gripper. There you can see which STL files are used and adapt the models.
Hint
Modify existing CAD models instead of creating completely new ones, so you no longer have to worry about scaling or positioning the gripper.
Prepare CAD¶
A model of the gripper is required so that Mikado Control can carry out gripper and path planning. You therefore need a CAD model of the gripper in STL file format. Make sure that you reduce the number of triangles to the necessary minimum. An extremely high number of triangles can greatly delay the collision checks and thus lead to long execution times. Reduce the model so that all structures lie within the model but are still precise enough for the gripping processes. It usually makes sense to approximate the base body more closely than the gripper jaws, for example.
If you are using a gripper type with moving elements (e.g. a parallel gripper), you will need the individual parts as STL files. A parallel gripper therefore consists of three STL files: Base unit, left gripper finger (or jaw) and right gripper finger. If the gripper has no moving elements (vacuum or magnetic gripper), one STL file containing the complete gripper is sufficient.
Now save the files in the meshes/ directory of your cell project directory.
Hint
If the gripper fingers are symmetrical, you can use the same model for both gripper fingers. They then only differ in their positioning on the robot.
The example image of the Mikado visualization above shows a parallel gripper consisting of the following components:
Basic geometry of the example gripper (shown in black above)¶
Finger geometry of the example gripper (shown in gray above): Coordinate origin is on the z-axis of the robot tool flange. This facilitates positioning.¶
Integrate CAD¶
Once all the required CAD files are available, you can integrate them into your cell using the Mikado Assistant.
As soon as you have created your cell via the Mikado Assistant, a gripper template is already included. To use your own gripper model, you can now adjust the file paths that are defined in the URDF file of the gripper model:
<mesh filename="package://mein_projekt/meshes/greifer_dateiname.stl" />
Hint
In addition to STL files, you can also integrate gripper models in DAE format.
Greifermodell positionieren¶
You will find that the gripper is often incorrectly scaled or not positioned in the desired location.
Adjust scaling
Set the ‘scale’ property if the STL file does not use the meter unit. In this example, the unit mm was used in the STL, hence the factor 0.001:
<mesh filename="package://mein_projekt/meshes/greifer_in_mm.stl" scale="0.001" />
Adjust gripper position
Just as with cell geometry, individual bodies/parts are connected and positioned using joints. The position of the gripper and the gripper parts attached to it can therefore be changed in the same way. Further details are described in detail in section URDF.
Do not forget to also adjust the joint
<joint name="gripper_to_tcp" type="fixed">. This joint defines the position of the gripping point on the tool and is visualized in Mikado as a transparent sphere.
Mikado configuration¶
To ensure that your gripper is controlled correctly, define the properties of a gripper in the configuration file, which is explained in the gripper.yaml section.
Gripper connection variants¶
Most of the gripper variants can be integrated via robot IOs or a fieldbus. Which IO assignment you use for the open and close actions is also entered in the Mikado configuration (see gripper.yaml).
If you are using a gripper that is controlled via TCP/IP, you must assign an IP to the gripper via the manufacturer’s software that is located in the Mikado controller network. Now enter the IP in the main.launch file in the launch/ directory. Within the file you will find the following line in which you must enter the new IP address.
<include file="...">
<arg name="ip" value="10.0.1.13" />
Calibrate TCP¶
During TCP calibration, the transformation of the gripper assembly to the robot flange is determined.
Transformation determined by the TCP calibration.¶
A check of the TCP offsets after a gripper has been set up or reassembled is strongly recommended. Any deviation of the assembly from the values entered in the gripper position must be recognized when gripping or approaching parts.
A simple Mikado sequence helps you to visually check whether the gripper position entered is correct.
Start the Mikado Control interface after you have set up your gripper
Place the calibration plate in front of the robot in the camera’s field of view in the recording pose
Download the following Mikado program from programs/examples/tcp_calibration_example.program, or create it manually
Move robot to a suitable recording pose
Determine pattern pose
Reverse pattern pose (roll 180°)
Move pattern pose in z-direction (e.g. by +10 mm)
Move TCP of the robot to the determined pose
The robot should now be positioned with the TCP of the gripper centrally above the middle point of the calibration plate and at the specified distance from the surface of the plate (e.g. 10 mm)
Measure the deviations from the expected central position and apply the deviations to the offset of gripper_tcp in the Mikado Assistant gripper editor
The offset from gripper_tcp_uncalibrated to gripper_tcp indicates the offset between the TCP position expected in CAD and the actual measured TCP position
After saving the changes in the Assistant, the Mikado GUI must be restarted to read in the new values
Repeat the process to ensure that the new offset values have led to an improvement in positioning accuracy
Set up hardware¶
This section contains instructions for connecting specific hardware to Mikado Control.
Overview of connections/cabling¶
The Mikado controller must be connected to the camera, but there are different things to consider here depending on the camera model. The compact N-series cameras can alternatively be connected via PoE (Power over Ethernet) or via a separate power supply (24V). Data is transmitted via Gigabit Ethernet. This requires a sufficiently shielded cable, at least Cat 5e.
The wiring of a cell containing an X36 camera is shown below. In particular, the minimum voltage of > 20 V at a current of 5 A at the camera must be observed. When calculating the voltage drop, the cable length in particular must be taken into account. There is a return path, as there is a positive and negative pole. The voltage drop also depends on the current, the cross-section of the cable and the specific electrical resistance of copper. The network cable or the fiber optic cable from the Mikado controller to the camera or from the Mikado controller to the robot are not included in the scope of delivery, as the length depends on the system design.
Example for calculating the voltage drop as a function of the cross-section and cable length¶
As cables with a cross-section > 0.5 mm² can only be accommodated in an M8 connector with great effort, it is advisable to choose an M12 cable with an M12 to M8 adapter connected to the end.
Connection overview when using an Ensenso X36¶
While a network switch is integrated in an Ensenso X36, the XQ model has an external switch that is supplied wired directly to the XQ camera. This does not require an M8 plug, but three cables. There are connectors on the switch into which the cables and their ferrules are plugged. The images are transmitted from the switch to the Mikado controller via a fiber optic cable to ensure high transmission speeds. The 10 GBit network card required for this and the adapter for the Mikado controller are included in the scope of delivery.
Connection overview when using an Ensenso XQ (photo shows an X36, not an XQ)¶
If you want Mikado to communicate with your PLC via a fieldbus such as ProfiNet, please contact us when ordering so that a corresponding interface card can be included in the planning. If you want to communicate via OPC UA, for example, no additional hardware is usually required.
Network adapter¶
The Mikado controller must be connected to components such as the Ensenso camera and robots via a TCP/IP interface. How to set this up correctly is explained below.
Fixed IP¶
In this configuration, each component is connected to a dedicated network port on the Mikado controller. A fixed IP is then assigned to the controller and the components. On the Mikadocontroller side, this works by first switching to the network settings, for example by clicking on the network icon at the bottom right of the taskbar and then clicking on the settings icon in the dialog:
Open screenshot of network settings¶
To set a fixed IP, follow the five steps:
Selecting the appropriate adapter
Selection of the IP v4 tab
Selection method: Manual
Create a new entry in the list using + Add and enter an IP and subnet mask.
Apply and OK
Screenshot Configure fixed IP network settings¶
Warning
No two network adapters should be in the same address space, as this makes packet transmission ambiguous. For example, configure one port to 192.168.5.1 and another to 192.168.2.1.
Set up Ensenso cameras¶
Setting up a camera is basically divided into three steps.
Setting up the network interface and thus communication with the camera
Optimization of the camera configuration for the scenario, in particular exposure time, FlexView and parameters for stereo matching
Hand-eye calibration for the micado cell
Setting up the camera network adapter¶
The first step is to establish a connection to the camera. To do this, it must be assigned an IP in the subnet space of the Mikado network adapter. Once the network adapter has been set to the desired IP, this can be done using the Network Wizard in NxView.
If no cameras are displayed in NxView, please check the following points:
LEDs on the Ensenso camera flash to indicate that the camera is energized
Ensenso N-Series: Start
sudo idscameramanagervia the console. This is a stand-alone tool for configuring the camera driver. If the camera is still not found after a few seconds, the “ETH-ConfigurationMode” must be activated under “Daemon Control” for the network adapter used. The camera found in this way can be assigned a fixed IP in the same address space using “Manual ETH configuration”.Use the latest version of the Ensenso Manual to look up further information on the correct configuration and connections of your system.
If several cameras are used in your application, you must connect both devices to separate network adapters on your Mikado controller. Both adapters must be in their own subnet.
Hint
For example, if the fixed IP of a network adapter is 192.168.2.42 (with subnet mask 255.255.255.0), the same address space only means a permitted difference in the last block of numbers. A suitable IP for the camera would then be 192.168.2.3, for example.
Warning
No two network adapters should be in the same address space, as this makes packet transmission ambiguous. For example, configure one port to 192.168.5.1 and another to 192.168.2.1.
Camera configuration¶
The camera configuration refers to the internal parameter set of the 3D sensor used. The NxView software is used to configure the camera. The following steps are required to create a camera configuration:
Open NxView and select the desired camera.
As soon as the camera is open, click on the parameter icon. A new window opens.
All camera parameters can be set in the parameter window. As soon as you have found a parameter set that produces the required data quality, save the parameter set. To do this, click on the Save button. A suitable name can be the serial number of the camera, e.g.
229020.json.
A dialog box opens in which you select the file path of your Mikado cell (1), choose a descriptive name for the camera configuration file (2) and finally click on Save (3).
Now open the cell in the Mikado Assistant and select the newly created configuration in the menu item ‘Parameters → Cameras → Config file’.
Further detailed information can be found in the NxView Manual.
Note
With an Ensenso X series, an intrinsic calibration may still be necessary.
Hand-eye calibration¶
Starting the hand-eye calibration from the user’s perspective is described in more detail in the chapter Hand-eye calibration. For this to work, the movement parameters must be defined during calibration. These are listed in chapter calibration.yaml.
File camera¶
File cameras offer good optimization options for newly created cells as well as error reporting options. It is possible to collect the necessary raw data both from Mikado and using NxView. It is especially recommended for setups with a moving camera (cameras on the robot arm) to collect the data from Mikado, either with the corresponding task in the program flow (see task ‘Save image’) or on the recognition page using the Save last shot button. Mikado also saves a link file for each recording, which contains the current robot position for moving cameras. Uncalibrated file cameras display the point cloud in the visualization as if the camera were positioned in the coordinate origin looking upwards. Nevertheless, object recognition can also be carried out with an uncalibrated camera without any problems, for example as part of a preliminary inspection.
The following raw data is written for each recording:
Pictures |
*.png |
Number of FlexView x (left, right) |
Kameraparameter |
*_calib.json |
1x |
Roboterposition |
Links*.txt |
1x |
Creating a file camera from recorded data can be done via NxView. In the interface, select ‘Create’ → ‘File Camera’ and the path of the folder containing the raw data. You can then adjust the serial number of the camera, which is set to ‘File[serial number]’ by default.
Now the serial number of the camera must be adjusted in Mikado, see chapter camera_X.yaml. In this configuration file, also pay attention to the parameter fixed_camera, as this also indicates whether the camera was movable or fixed for file cameras. Mikado then uses the recordings from the file camera in the order in which they were recorded. Once the last shot has been taken, the file camera starts again from the beginning. The camera parameters that are stored with the file camera are used, not those loaded when Mikado is started or in the program sequence.
Warning
File cameras that are in a *.zip can be created in NxView, but are not supported by Mikado. These must be unzipped and the file camera created with the unzipped files.
Multi-Camera Setup¶
If you would like to integrate an additional camera into your application, the following steps must be carried out for installation:
Connect the camera to the controller and set up communication as described in Setting up the camera network adapter.
Create a second camera configuration and also save it in the
configdirectory.Copy the file
camera_0.yamlin theconfigdirectory, rename the copy (e.g.camera_1.yaml,camera_2.yaml, etc.) and open it. Now adjust the entries there (see section camera_X.yaml).Open the file
main.launchin thelaunchdirectory and insert the following section under the line<!-- Cameras -->. Make sure that you give the camera a new unique name and enter the correct configuration file.<node name="Ensenso_Camera_1" pkg="ensenso" type="ensenso_node" output="screen" ns="cameras"> <rosparam command="load" file="$(arg project_dir)/config/camera_1.yaml" /> </node>
Start Mikado and check in System status whether the camera could be opened correctly.
The camera is now set up. You can now continue with the hand-eye calibration (see Hand-eye calibration). The Mikado interface will now display a selection dialog for the camera to be used at the appropriate points. The active camera can be adjusted in your Mikado process via the task ‘Set active camera’. The currently active camera can be seen in the system bar at the bottom.
Setting up the robot controller¶
The setup of the robot controller is described in chapter Robot models.
Fieldbus interface¶
- Brief description of the interface
- General communication process
- Communication status
- Synchronizing PLC variables and Mikado variables
- Rotation convention
- Error codes
- Commands
- Example sequence for select cells
- Updates
- Specific configuration for Profinet
- Specific configuration for Beckhoff ADS interface
Wago/Beckhoff IO¶
The documentation for connecting to an IO coupler from Wago, Beckhoff or another Modbus/TCP server is not yet complete, please contact us for a preliminary version.