ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How to change laser scan point size and colour in ros3djs?

asked 2021-04-12 05:56:11 -0500

Py gravatar image

I'm visualising laser scan points in ros3dlib using the code snippet below. This works well but the points seem to be displayed as big white blocks on my web GUI. How do I change these to small red points?

let frontLaserScan = new ROS3D.LaserScan({
    ros : this.ros,
    tfClient : tfClient,
    topic : '/lidar_scan',
    rootObject : viewer.scene,
});
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-04-12 08:00:06 -0500

Py gravatar image

Worked it out! Just need to set the material option like this:

let frontLaserScan = new ROS3D.LaserScan({
    ros : this.ros,
    tfClient : tfClient,
    topic : '/lidar_scan',
    rootObject : viewer.scene,
    material : { size: 0.1, color: 0xff0000 }
});
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-04-12 05:56:11 -0500

Seen: 238 times

Last updated: Apr 12 '21