Setting Up a Project
A project is a settings file and the files it names (see JSON Settings). This page lists what to gather before writing one, and how to prepare the meshes and the robot models so that they all agree.
Requirements
-
Example recordings. First check whether the customer’s requirements can be met. Start from example recordings of a LumiScan camera (point cloud and centre view) together with the camera’s calibration file. During the setup they show whether the detection works and reaches the required accuracy, and they can be replayed throughout the setup (
--simulate-camera, see Starting LumiScan VGR). -
The objects. All available information on the objects to detect: CAD files (needed for CAD matching, otherwise used for visualization only) and a complete list of the object types with their descriptions (dimensions, colours, and so on).
-
The robot’s pose format. The translation unit and the rotation convention: quaternions, axis-angle or Euler angles, with the rotation order and whether the rotations are intrinsic or extrinsic. They go into the robot’s
poseFormat(see RobotSettings). -
Meshes of the robot and the cell. Needed for collision avoidance, otherwise used for visualization only. For the robot mesh, the transform from the mesh base to the TCP is needed as well.
-
Hand-eye transforms between the robots and the cameras. They are needed to compute the grip pose for each robot (see Hand-Eye Calibration).
Preparing the Meshes
LumiScan VGR gives all distances in metres; only the PLC interface can transfer other units. Object meshes and URDF descriptions must therefore be in metres as well. A URDF file can scale a mesh with its scale attribute, but converting every mesh to metres avoids confusion.
- Object mesh origin
-
With CAD matching, grip points are given relative to the origin of the object mesh. Most objects have a single grip point and a rotational symmetry. With the mesh origin moved to the grip point, usually with the z-axis pointing into the model, the grip point’s
poseis the identity matrix. - Robot mesh origin
-
The origin of a robot geometry should coincide with the frame of its link, to avoid extra offsets. A gripper mesh, for example, can have its origin in the TCP or in the flange frame.
The robot model itself is described in Robot Model (URDF).
Consistent Transformations
All URDF models are defined relative to one global coordinate system: their shared root link (for example world). Collisions are computed there. The links of every robot and every environment stand where their joints put them. The point cloud and the detected objects, known in robot base coordinates through the hand-eye transform, are moved there by the pose of the robot’s baseFrame in the root.
Usually the root is the robot origin (world to robot_base at zero), so that robot base coordinates are root coordinates. A static collision geometry must then have the same origin. This can be achieved in several ways, for example with the origin tags of the URDF file, but the easiest is to transform the collision mesh itself so that its origin is the robot origin. If the robot base stands elsewhere in the root, place the aligned mesh at the pose of the robot base (the same world origin). To align the mesh, for example in CloudCompare:
-
Load a point cloud that shows the collision geometry.
-
Apply the hand-eye transform to the point cloud, to bring it into the robot’s coordinate system.
-
Load the mesh of the collision geometry.
-
Align the mesh with the transformed point cloud.
-
Save the mesh.
Notes on the values in a URDF file:
-
The translations (
origin,xyz) are in the unit of the meshes: metres. -
The rotations (
origin,rpy) are the Euler angles rollr, pitchpand yawy, in radians, applied asR = rotz(y) * roty(p) * rotx(r)
-
Each rotation has two RPY representations with every angle in [-180°, 180°]: if
(r, p, y)is one,(r + 180°, 180° - p, y + 180°), wrapped into that range, is the other. Use the one whose pitch lies in [-90°, 90°]; it is unique and the more intuitive.