Change appearance of sensor cones

Typically: "How do I... ", "How can I... " questions
Post Reply
phitastic
Posts: 4
Joined: 10 Feb 2021, 02:00

Change appearance of sensor cones

Post by phitastic »

Hello,

I was wondering if it is possible to change the appearance of the area covered by a vision sensor (cone)? I.e., to visualize the area the vision sensor is seeing with some reddish tint or some other color with an alpha channel/transparency level set?

The goal is to visualize e.g. a top-down sensor coverage picture that does not just show the thin blue lines surrounding the vision sensor cone but in addition highlight / color the swept volume as well.

Thanks!
P

fferri
Posts: 714
Joined: 09 Sep 2013, 19:28

Re: Change appearance of sensor cones

Post by fferri »

There is a whole load of visual properties you can change in the properties dialog of the proximity sensor.

If that is not enough, you can use a simulation script to do additional things, when something is detected / not detected, e.g. creating a drawing object, a point cloud, an octree or a mesh.

phitastic
Posts: 4
Joined: 10 Feb 2021, 02:00

Re: Change appearance of sensor cones

Post by phitastic »

Thanks @fferri! Is it also possible for a vision sensor? That's the one I am using and none of the settings appear to affect the color of the volume (only the sensor itself, not filling the cone with a color).

Thanks!

fferri
Posts: 714
Joined: 09 Sep 2013, 19:28

Re: Change appearance of sensor cones

Post by fferri »

Vision sensors do not have detection volume.

Vision sensors have a frustum, which depends on the rendering properties (near/far clipping planes, and perspective angle if any).

phitastic
Posts: 4
Joined: 10 Feb 2021, 02:00

Re: Change appearance of sensor cones

Post by phitastic »

Thanks again! I understood that there is no detection volume. I think my choice of words may not have been super clear. What I am trying to achieve is a top-down (say) view of sensor coverage, similar to a look like here: https://images.newscientist.com/wp-cont ... ?width=800 .

If I could color the individual vision sensor "area"/"coverage", then I could generate such a picture from top-down, side, etc. Just curious if there would be a way to achieve that with a vision sensor or otherwise.

Thank you!
P

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

Re: Change appearance of sensor cones

Post by coppelia »

Hello,

for that you can use drawing objects as described by #fferri. Additionally, you can also use shapes for that. So hide the vision sensor, and place such an item over it, so that it acts as a proxy.

Cheers

phitastic
Posts: 4
Joined: 10 Feb 2021, 02:00

Re: Change appearance of sensor cones

Post by phitastic »

Thank you, much appreciated. I'll give it a try.

Post Reply