Search found 39 matches

by DavideIng
17 Nov 2017, 15:06
Forum: General questions
Topic: Get orientation and use it for a specific task
Replies: 5
Views: 1574

Re: Get orientation and use it for a specific task

Now I get the desired angle but my algorithm is still not working. The basic idea is: 1) At the begining ''ImageTable_rgb'' is white, afther 10 seconds (simulation time) it became red and the if statement conditions became true 2)The orientation of the ePuck (i.e e[3]) now is around 0 radiant, there...
by DavideIng
16 Nov 2017, 17:53
Forum: General questions
Topic: Get orientation and use it for a specific task
Replies: 5
Views: 1574

Get orientation and use it for a specific task

Hello, I am working with an ePuck, the task is: When the conditions about the components of ImageTable_rgb (as you can see in the code below) are true, the ePuck has to be rotated of 90 degrees. To do that I am using the following code: ImageTable_rgb=simGetVisionSensorImage(handleVision,0,0,0) Orie...
by DavideIng
16 Nov 2017, 13:00
Forum: General questions
Topic: Extract a vector from a table
Replies: 2
Views: 1281

Re: Extract a vector from a table

Fix it, I needed to be able to use the three component of the rgb vector retrieved by simGetVisionSensorImage to set an if statement like the following: ImageTable_rgb=simGetVisionSensorImage(handleVision,0,0,0) if (ImageTable_rgb [1]>0.5) and (ImageTable_rgb [2] < 0.2) and (ImageTable_rgb [3] < 0.2...
by DavideIng
15 Nov 2017, 12:22
Forum: General questions
Topic: Extract a vector from a table
Replies: 2
Views: 1281

Extract a vector from a table

Hello, I am getting the rgb image of an ePuck vision sensor. The following satement has been used: ImageTable_rgb=simGetVisionSensorImage(handleVision,0,0,0) Now, ImageTable is a table containing rgb values and I need to extract a vector (3rd dimension of the table) refeared to a random couple of th...
by DavideIng
14 Nov 2017, 13:19
Forum: General questions
Topic: Exchange information between ePucks
Replies: 1
Views: 1054

Exchange information between ePucks

I have set up a scene where a swarm of ePuck have to to exchange informations between closer neighbor like position or a color vector read from vision sensor ( there is a screen in front of all vision sensors painted with a uniform color).
Any suggestions?

Many thanks
Davide
by DavideIng
10 Nov 2017, 12:55
Forum: General questions
Topic: How to change the origin of the absolute coordinate system
Replies: 1
Views: 1346

How to change the origin of the absolute coordinate system

Hello,
I have setted up a vrep scene with many ePucks, I get they position from Matlab but some coordinates are negative.
I need to shift the origin of the absolute coordinate system to get all the position components (X,Y,Z) positive.
Someone might explain my how to do that?

Many thanks
Davide
by DavideIng
24 Oct 2017, 11:09
Forum: General questions
Topic: GetSimulationTime
Replies: 1
Views: 1032

GetSimulationTime

Hello, I am trying to get the simulation time about vrep scene and send it to Matlab. I am using the following statements: Vrep Non-Threaded Child Script: if (sim_call_type==sim_childscriptcall_initialization) then simExtRemoteApiStart(20001) handleCuboid = simGetObjectHandle('Cuboid') simulationTim...
by DavideIng
19 Oct 2017, 15:21
Forum: General questions
Topic: Error Using simSetShapeColor
Replies: 3
Views: 1634

Re: Error Using simSetShapeColor

I checked but doesn't works again. Vrep Plane1 (primitive shape) Non-Threaded Child Script: if(sim_call_type==sim_childscriptcall_initialization) then simExtRemoteApiStart(20001) Plane1Handle = simGetObjectHandle('Plane1') r,initColor=simGetShapeColor(Plane1Handle,nil,0) SentString = simPackFloatTab...
by DavideIng
19 Oct 2017, 12:08
Forum: General questions
Topic: Error Using simSetShapeColor
Replies: 3
Views: 1634

Error Using simSetShapeColor

Hello, I have a problem with simSetShapeColor arguments. The following is the code to get a color string from Matlab: if (sim_call_type==sim_childscriptcall_actuation) then GotString = simGetStringSignal('ChangeColor') UnpackedString = simUnpackFloatTable(GotString) simSetShapeColor(handlePlane,nil,...