How to make paint nozzle?

Typically: "How do I... ", "How can I... " questions
dims
Posts: 4
Joined: 30 Apr 2015, 12:43

How to make paint nozzle?

Post by dims »

Hello,

I want to make a paint nozzle to mark the distance traveled by the robot , Any idea about how can I do it ? Whether there is a tutorial which can guide me ?

Thanks.

coppelia
Site Admin
Posts: 10336
Joined: 14 Dec 2012, 00:25

Re: How to make paint nozzle?

Post by coppelia »

Hello, are you sure you want to use a paint nozzle for that? Wouldn't a graph marking the path not be enough?

For the graph solution, make sure to follow the BubbleRob tutorial.
For the paint nozzle solution, have a look at the models located in Models/components/modifiers/.

Cheers

Hrithik Verma
Posts: 22
Joined: 07 Sep 2020, 21:20
Contact:

Re: How to make paint nozzle?

Post by Hrithik Verma »

Check the script of nozzle use in this scene: https://github.com/Hrithik-verma/Painti ... n-in-V-rep
you will get some idea how to use this nozzle to paint during simulation with a robotic arm.

If you wish you can also the simulation outcome video of the above painting robot (note: It is not a promotion):
https://www.youtube.com/watch?v=zWw30r7q_Ho

elizakh
Posts: 29
Joined: 20 Feb 2021, 13:27

Re: How to make paint nozzle?

Post by elizakh »

Hi,
Why is the reason that when the paint nozzle is painting a surface, while the simulation stills running, the paint is cleaning automatically after few seconds?

Thanks in advance

coppelia
Site Admin
Posts: 10336
Joined: 14 Dec 2012, 00:25

Re: How to make paint nozzle?

Post by coppelia »

This is because of some settings. You can modify this in CoppeliaSim V4.2, via the paint nozzle dialog (buffer size), or inside of the customization script attached to the paint gun, modify bufferSize to something larger.

Cheers

Hrithik Verma
Posts: 22
Joined: 07 Sep 2020, 21:20
Contact:

Re: How to make paint nozzle?

Post by Hrithik Verma »

You can increase the buffer size by going on the child script. But even after increasing the buffer size paint will only remain for some time in the wall because in code actually it more like drawing something not a permanent color on the wall. But in reality it will make a permanent color on the wall.

If you want to learn that painting robot in much details than you can check my course on Robotics With V-REP / Coppeliasim
Note- I'm not trying to promote the course but if you are interested than you can check.

link: https://www.udemy.com/course/robotics-w ... 0AF5B39316

If you still get any doubt let me know.

Wish You Happy Learning !!!
Best Regards

elizakh
Posts: 29
Joined: 20 Feb 2021, 13:27

Re: How to make paint nozzle?

Post by elizakh »

Hi again,
Thanks Coppelia for your response, and also thank you Hrithik Verma for your help.

I'm trying to paint a wall with Paint Nozzle attached to a LBR4p.

The objective is to move a dummy around the wall and the dummy target of the robot must follow that dummy and paint the wall.
For achieve that, I use IK in Coppelia V4.2, with sim.moveToPose.
The dummy only

But sometimes, when robot follows the dummy, (he must do linear movements) It seems like the robot can't resolve the IK and starts to do aleatory movements and it goes crazy and do random movements in the Joints.

Here a little fragment of my Coppelia's code:

Code: Select all

if dataFromExternalApp then
longitud=dataFromExternalApp[1]
d_pasadas=dataFromExternalApp[2]
posdummy=sim.getObjectPosition(goaldummy,-1)
cambiarPos=sim.setObjectPosition(goaldummy,-1,{longitud,posdummy[2],posdummy[3]})
targetPose=sim.getObjectPose(goaldummy,-1)
endPose,timeLeft=sim.moveToPose(flags,currentPose,maxVel,maxAccel,maxJerk,targetPose,callback)
tiempo=sim.getSimulationTime()



while posdummy[2]>0 do
posdummy=sim.getObjectPosition(goaldummy,-1)
if (suma_y==true) then
cambiarPos=sim.setObjectPosition(goaldummy,-1,{longitud,posdummy[2]-d_pasadas,posdummy[3]})
targetPose=sim.getObjectPose(goaldummy,-1)
currentPose=sim.getObjectPose(simTarget,-1)
endPose,timeLeft=sim.moveToPose(flags,currentPose,maxVel,maxAccel,maxJerk,targetPose,callback)
suma_y=false

else
if (resta_z==true) then
cambiarPos=sim.setObjectPosition(goaldummy,-1,{longitud,posdummy[2],z_1})
targetPose=sim.getObjectPose(goaldummy,-1)
currentPose=sim.getObjectPose(simTarget,-1)
endPose,timeLeft=sim.moveToPose(flags,currentPose,maxVel,maxAccel,maxJerk,targetPose,callback)
resta_z=false
else
cambiarPos=sim.setObjectPosition(goaldummy,-1,{longitud,posdummy[2],z_2})
targetPose=sim.getObjectPose(goaldummy,-1)
currentPose=sim.getObjectPose(simTarget,-1)
endPose,timeLeft=sim.moveToPose(flags,currentPose,maxVel,maxAccel,maxJerk,targetPose,callback)
resta_z=true
end
suma_y=true
end
I've tried to change the simIK.method , the damping value and the number of iterations, but It stills the same. Also, I've changed the velocity, acceleration and jerk to a little values, but anyway, without any result.

So, I want to know if there's another configuration values that I can change to optimize the movements.

Thanks in advance

Hrithik Verma
Posts: 22
Joined: 07 Sep 2020, 21:20
Contact:

Re: How to make paint nozzle?

Post by Hrithik Verma »

I guess this issue may be because of singularity. Your path or points through which path is being made might have a singular point or a point which is near to singularity due to which your robot joint motor overshoots and its start behaving odd.
Simple solution could be try adjusting robot or try adding some more target point on path so that by rml method you can create more smooth path free from singularity. You have to do many hit & trial to get it correct.

or
You can try using OMPL plugin to create a path which is free from all obstacles as well as smooth.

coppelia
Site Admin
Posts: 10336
Joined: 14 Dec 2012, 00:25

Re: How to make paint nozzle?

Post by coppelia »

Yes, or simply set all your revolute joints to cyclic to see if the joint limits are causing your problems. If this is the case, then there is no solution to move to your target in a straight line. You'll have to move via other waypoints, or use path planning instead of inverse kinematics.

Cheers

elizakh
Posts: 29
Joined: 20 Feb 2021, 13:27

Re: How to make paint nozzle?

Post by elizakh »

Thank you,
finally after trying many options, I've found the optimal solution for that.
But I've another question about the paint nozzle.
I want to specify the paint item by code in the customization script associated to the dummy "PaintNozzle".
So I've deleted all the functions relative to the dialog of the paint nozzle and in sysCall_init() I specify the paint item (i.e: mode=sim.drawing_lines). However, the dialog stills appearing when I click the dummy "PaintNozzle" and the paint item only changes If I change It in the dialog, but I want to do it that via script. Seems like Coppelia ignores when I specify the paint item by code and I don't know how can I fix it.

Thanks in advance

Best regards

Post Reply