I want to create a mobile robot that follows the heat path. And I have a few questions about it because as I found out I can create a temperature sensor using a vision sensor by auxiliary component but my questions are about the path.
Is it possible to create such a path that after a while would begin to decrease in the auxiliary red, showing the natural process of cooling the path, or would it be possible for this path to expand width to show that heat is spreading sideways?
The last question is is there perhaps a path generator that would create a path extension while the simulation is running?
Heat Path (Expand and decrease during simulation and generator path)
Re: Heat Path (Expand and decrease during simulation and generator path)
Hello,
sorry for the delay. This is not directly something that is supported. You could try to apply a single texture to a floor object, and modify that texture on the go, e.g. with
Cheers
sorry for the delay. This is not directly something that is supported. You could try to apply a single texture to a floor object, and modify that texture on the go, e.g. with
sim.writeTexture
.Cheers
Re: Heat Path (Expand and decrease during simulation and generator path)
Ok Thanks :)
And do you have any example use of this function in your project? Or maybe a tutorial for this function because I'm trying to do some texture with several levels but unfortunately It don't work.
Thank you in advance
And do you have any example use of this function in your project? Or maybe a tutorial for this function because I'm trying to do some texture with several levels but unfortunately It don't work.
Thank you in advance
Re: Heat Path (Expand and decrease during simulation and generator path)
Hello,
you can write some code, and we'll try to correct it.
Cheers
you can write some code, and we'll try to correct it.
Cheers
Re: Heat Path (Expand and decrease during simulation and generator path)
Writing a texture is as simple as this:
Code: Select all
plane=sim.getObjectHandle('Plane')
viz=sim.getShapeViz(plane,0)
data={}
for i=1,128 do -- 1st dimension
for j=1,128 do -- 2nd dimension
for h=1,3 do -- 3 channels (RGB)
grayValue=math.floor((i-64)*(i-64)*(j-64)*(j-64)*255/64/64/64/64)
table.insert(data,grayValue)
end
end
end
sim.writeTexture(viz.texture.id,0,sim.packUInt8Table(data),0,0,0,0,0)