Generate Rect Path

You are currently viewing the documentation for the latest version (2.2.0). To access a different version, click the "Switch version" button located in the upper-right corner of the page.

■ If you are not sure which version of the product you are currently using, please feel free to contact Mech-Mind Technical Support.

Function

This Step generates a rectangular path based on the input object point cloud and fits the four edges of the point cloud’s bounding rectangle through lines and corner smoothing.

Usage Scenario

This Step is typically used in edge gluing applications for rectangular hatches and glass surfaces, generating smooth gluing trajectories along object edges.

Input and Output

Input

Input port Data type Description

Object Cloud

PointCloud/XYZNormal

Point cloud data of the object.

Full Cloud (with normals if usePointNormal)

PointCloud/XYZNormal

Scene point cloud containing the object.

Reference Point

Pose[]

Starting target point of the rectangular path.

Output

Output port Data type Description

Trajectory Poses

Pose[]

List of poses on the generated rectangular path.

Unnamed

Image/Color

2D orthographic projection image of the path.

Parameter Description

Reliable Contour Points Settings

Parameter Description

Max Distance from Contour Point to Line

Parameter description: This parameter is used to filter the maximum distance threshold from contour points to a line.
Default value: 30.000 px

Max Distance from Contour Point to Rectangle Corner

Parameter description: This parameter is used to filter the maximum distance threshold from contour points to rectangle corners.
Default value: 30.000 px

Only Rect Nearest Contour

Parameter description: When checked, only the contour points closest to the reference rectangle are detected.
Default value: Unselected

Increment of Closest to Line Dis

Parameter description: This parameter is used to increase the distance threshold when calculating reliable contour points.
Default value: 1.0000 px

Smoothing Settings

Parameter Description

Smooth Contour Points

Parameter description: This parameter is used to control whether to smooth the obtained high-quality contour points.
Default value: Unselected

Contour Smooth Gaussian Filter Radius

Parameter description: This parameter is used to set the radius of the Gaussian filter used for smoothing.
Default value: 10

Contour Smooth Gaussian Filter Sigma

Parameter description: This parameter is used to set the standard deviation of the Gaussian filter used for smoothing.
Default value: 10.00

Accurate Corner Detection

Parameter Description

Calc Accurate Corner Method

Parameter description: This parameter is used to set the exact calculation method used to calculate the corners of the rectangle.

Value list:

  • ByMinAreaRect: Default value. Calculate corners based on the minimum bounding rectangle.

  • ByFitLineAndCalcCrossPoint: Calculate corner points based on intersections of fitted lines.

Distance Calculation Method in Line Fitting

Parameter description: This parameter is used to select the distance calculation method when fitting a line through the contour points of each edge, then obtaining the intersection points of lines as accurate corners.

Value list:

  • DIST_L1 (L1 distance): Uses absolute errors for fitting. Less sensitive to outliers than L2.

  • DIST_L2 (L2 distance): Uses squared errors for fitting. Smooth and commonly used, but more sensitive to outliers.

  • DIST_C (C distance): Uses a robust error function to down-weight large-error points.

  • DIST_FAIR (Fair distance): Balances L1 and L2, considering both stability and robustness.

  • DIST_WELSCH (Welsch distance): Strongly suppresses large-error points and is robust to many outliers.

Default value: DIST_L1

Corner Point Adjustment Settings

Parameter Description

Corner Arrangement Direction

Parameter description: This parameter is used to adjust the clockwise/counterclockwise direction of corners.
Value list: Clockwise and CounterClockwise.
Default value: CounterClockwise

Trajectory Points (2D) Settings

Parameter Description

Initial Pixel Spacing for 2D Points

Parameter description: This parameter is used to set the initial pixel interval for all 2D waypoints. Smaller values generate more waypoints, while larger values generate fewer path points.
Default value: 50.000 px

Ratio of Last Two Points to Interval

Parameter description: This parameter is used to set the ratio relationship between the last interval and the set interval.
Default value: 0.5000

Number of Points

Parameter description: This parameter is used to set the number of trajectory points between line endpoints and corners.
Default value: 5

Point Interval on Line

Parameter description: This parameter is used to regenerate line trajectory points using this interval.
Default value: 50.000 px

Erosion Settings

Parameter Description

Left Side Erode Dis

Parameter description: This parameter is used to set the erosion distance on the left side of the rectangle.
Default value: 0.000 mm

Bottom Side Erode Dis

Parameter description: This parameter is used to set the erosion distance on the bottom side of the rectangle.
Default value: 0.000 mm

Right Side Erode Dis

Parameter description: This parameter is used to set the erosion distance on the right side of the rectangle.
Default value: 0.000 mm

Top Side Erode Dis

Parameter description: This parameter is used to set the erosion distance on the top side of the rectangle.
Default value: 0.000 mm

Trajectory Points (3D) Settings

Parameter Description

Neighbour Depth Search Size

Parameter description: This parameter is used to set the kernel size when searching neighborhood depth.
Default value: 10

Use Point Cloud Normal as Pose Orientation

Parameter description: This parameter is used to control whether to use point cloud normals as the pose direction.
Default value: Unselected

Start Point Adjustment Settings

Parameter Description

Adjust Input Poses by Starting Point

Parameter description: This parameter is used to control whether to adjust the start point position to the middle of the corresponding edge according to the input reference pose.
Default value: Selected

Robot Movement Settings

Parameter Description

Is Send M Ps to Mech-Viz

Parameter description: This parameter is used to control whether to send path points to Mech-Viz for visualization.
Default value: Unselected

Corner Motion Type

Parameter description: This parameter is used to set the motion type of the robot at corners.

Corner Vel

Parameter description: This parameter is used to set the velocity of the robot at corners.
Default value: 0.1000

Corner Acc

Parameter description: This parameter is used to set the acceleration of the robot at corners.
Default value: 0.1000

Corner Blend Radius

Parameter description: This parameter is used to set the blending radius of the robot at corners.
Default value: 0.1000

Line Motion Type

Parameter description: This parameter is used to set the motion type of the robot on line segments.

Line Vel

Parameter description: This parameter is used to set the velocity of the robot on line segments.
Default value: 0.1000

Line Acc

Parameter description: This parameter is used to set the acceleration of the robot on line segments.
Default value: 0.1000

Line Blend Radius

Parameter description: This parameter is used to set the blending radius of the robot on line segments.
Default value: 0.1000

Is this page helpful?

You can give a feedback in any of the following ways:

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.