Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Sanding concave surface

#1
Hello everyone,

I'm trying to sand a countertop with integrated sink. I have attached an image of the part I'm trying to sand.
I am using a compliant tool, so my path does not have to be perfect. I'm also using a flexible sanding pad, to increase the surface area of the sanding disk that is touching the part while sanding the parts that aren't flat.

I have projected a curve onto the part. When sanding, my TCP follows this curve. This causes a large part of the sanding disk to clip through the part. I have tried to fix this by offsetting my path in the tool-Z direction. This works somewhat, the sander lifts up and only the outer edges touch the part. This is okay. However, when I move over from the sink to the outside of the part, the sander floats above the part. This is not what I want. Is there any way to generate a path where the outer edges of the sanding disk are touching the part?


Attached Files Thumbnail(s)
       
#2
There isn't an easy way to solve this but I understand you are familiar with Python scripts as you created this path automatically. Correct?

In that case, you could iteratively check collisions for each point (part against a simplified round shape of the sander) and iteratively retract the point until you don't have collisions between the part and the sander.

If you have some compliance on your tool you don't need to be very accurate and you can have 1-5 mm tolerances. It should not take long to calculate unless you have many points.

If you can share your RDK project and script we can better help you.
#3
Hi Albert,

My path does not come from a python script, however I'm familiar with python so this option would be interesting to me.
Right now, my path comes from Solidworks. I'm exporthing this with the RoboDK addon.
If I understand correctly you are proposing the following solution:
For each point on the path, check if there is a collision or not. If it collides, move it up until it does not collide anymore. If it does not collide, move it down until it collides.
I would do this with a simplified model of the tool, with the compliance at half extension, so I have maximal margin if the reality does not fully correspond with my simulation.

Could you point me in the right direction with how to implement this? I have attached a copy of my station. The path is a little differente from what my previous images show, but that should not make too much of a difference.


Attached Files
.rdk   20231117 exporteren paden.rdk (Size: 6.5 MB / Downloads: 119)
#4
Great, I added the Curve Offset CollisionFree script which will calculate a collision-free curve for robot sanding purposes.

How to automatically offset the curve for sanding:
  1. Model the surface that should be in contact with the surface. The object should be as simplified as possible for faster calculations You can approximately place it on the tool for visualization purposes.
  2. Place this object at the origin of the object reference (it can be set to invisible)
  3. Run the script Curve_Offset_CollisionFree available in the RDK project by double clicking on it
  4. Select the part with the curves first
  5. Select the part with the collision geometry
I attached the script and your sample project with these edits. 

You can configure the following parameters in the script:
Code:
# Set to True to invert the normals (flip the normals)
FLIP_NORMALS = False

# delta offset in mm
DELTAZ_OFFSET = 1

# Maximum offset to apply to a point of the curve (in mm)
MAX_DELTAZ_OFFSET = 500

# Display each step of the iterative search
# (set to True to visualize the iterative search for non colliding state for each point)
# Obtain faster results by setting it to False
RENDER_ITERATIONS = True
Let us know if it works, we are adding this script to the pool of Python examples available by default.


Attached Files
.rdk   20231117 exporteren paden-v2.rdk (Size: 6.51 MB / Downloads: 132)
.py   Curve_Offset_CollisionFree.py (Size: 3.98 KB / Downloads: 86)
#5
Hello Albert,

Thank you so much, that seems to be exactly what I'm looking for. I tried using the script and I do have some feedback, I hope that's okay.
  • Could the polish surface be moved back to the origin at the end of the script? It's easy to forget this when trying different paths, because it might be invisible.
  • I had an issue where the sanding surface would register no collision at the first attempted position, but the entire sanding surface seemed to be below the surface (ie, not in the right spot). I fixed it by using a thicker disk as sanding surface, but it might be possible to fix this in the script (?) Not exactly sure how though. I have attached a copy with my thicker pad, which generates the correct path, and the original pad, which does not work. I have been fiddling with the SolidWorks export settings in the meantime, so that might also have to do with it.
  • I think this could be sped up a lot, by using something like binary search to move the sanding disk up and down, instead of iterating in one direction. Might not be possible for more complex surfaces though...
  • The "Running python script" message in the bottom bar does not disappear, which is confusing when running it without rendering the progress.

I hope this feedback is appreciated. For me the current solution works fine, but I figured you might want to improve it before adding it to the standard library.


Attached Files
.rdk   20231117 exporteren paden-v3.rdk (Size: 6.55 MB / Downloads: 108)
#6
Excellent! Thank you for your feedback. We'll keep it as is for now and we may improve it in the future.

There is a flag to turn render to False which should already give you a faster solution. Having a binary search would be nice but would make the algorithm more complicated to understand.

You can place any object at its origin by running this line of code:
item.setPose(eye(4))
  




Users browsing this thread:
1 Guest(s)