How to position lighting and remove shadows in ros3djs?
When I display markers using ros3djs
they appear to be darker than they do on my default RViz
setup. It seems my issue is related to lighting direction in ros3djs
because I played around with different views in RViz
and found that the same issues with shadowing there but from different directions. To me, it seems that I need to specify lighting direction in ros3djs
. Is this possible?
Markers on ros3djs
web GUI:
Markers on RViz
:
I've played around with options like alpha
and intensity
in ROS3D.Viewer
but these do not solve the problem. I'm hoping something like the pseudo code below might be available but I can't find anything on the docs here...... any ideas?
Initial viewer setup (real code):
let viewer = new ROS3D.Viewer({
divID : 'map',
width : 600,
height : 600,
background : '#FFFFFF',
alpha : 1.0,
antialias : true,
intensity : 1.0,
cameraPose : {x : -1, y : 0, z : 20},
displayPanAndZoomFrame : true
});
Some pseudo code that I hope someone can advise how to properly implement:
viewer.addObject(new ROS3D.LightingPosition({x : -1, y : 0, z : 20}));
I would say it's actually RViz which is "wrong" here. It has a pretty limited lighting model IIRC.