ros3djs LaserScan does not display the points
Hello, I'm having a problem displaying the laser scan on my browser. here is my code:
var viewer = new ROS3D.Viewer({
divID : 'scan',
width : 800,
height : 600,
background: '#444444',
antialias : true
});
var tfClient = new ROSLIB.TFClient({
ros : ros,
angularThres : 0.01,
transThres : 0.01,
rate : 10.0,
fixedFrame : ''//laser_base_link
});
var scanclient = new ROS3D.LaserScan({
ros: ros,
topic: '/scanR',
tfClient: tfClient,
rootObject: viewer.scene,
material: { size: 0.05, color: 0xff00ff }
});
when I record a bagfile of the scan and run it on my laptop my browser display it perfectly, but when I try the same code on my jetson (nvidia nx) nothing displayed on the browser. and I tried to test the three.js & viewer from ros3djs by creating a simple Three JS cube and it was displayed. What am I missing here?
Is the browser you used a laptop in both cases? If so, I think you need to be able to see the topics you are publishing in jetson on your laptop.
For example, you can set the ROS_IP and ROS_MASTER_URI. Alternatively, you can use rosbridge.
Thank you for your reply. Is the browser you used a laptop in both cases? No,I'm running the UI and the rosbridge on the same machine. I mean on the jetson.
On my laptop I tested it on a simulated robot in gazebo, and I tested the bag file that I recorded from the jetson.
On the jetson, Rviz displays laser scans perfectly, and I can see that the rosbridge_websocket is a subscriber in the /scan topic but it can not be displyed on the browser.
Is it possible that the IP and port used for the websocket connection is different between the laptop and the jetson?
Did you fix it? I am trying to display laserscan in a similar way you posted but it does not work. I can't find any good tutorials for this. Does anyone have one to share?
Hey, Did you fix it? I'm trying to show laser-scan data but I couldn't. I am subscribing scan topic but I can not see anything on div. Is there any solution to this problem?