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

How can I round /scan topic values?

asked 2019-12-17 14:41:22 -0500

tominkoooo gravatar image

Hello! I am student and I really want to send /scan topic values to rtabmapviz. I am using ROS kinetic, /scan is topic created by RPLidarNode. Unfortunately I think that I need rounded values, because I really don't need 8 digit numbers. Do I have to create my own node to round those values, or is there another nice and fast way to do that?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2019-12-17 15:32:38 -0500

You could:

  • Modify the rp lidar driver to round in the way you'd like
  • Create a laser filter to round the values
  • Create a node between the rp lidar node and rtab-map to round the values and publish /scan_rounded
  • Modify rtab map itself

Many options :-)

edit flag offensive delete link more

Comments

1

Okay, I just rediscovered that I cannot round float, so nothing can be done. Anyway, thank you for response! :)

tominkoooo gravatar image tominkoooo  ( 2019-12-17 17:51:18 -0500 )edit

float can certainly be rounded.

But we seem to be ignoring something important here: why do you have the impression that you need to "round[ed] values"? I've not seen questions about this before on this forum.

gvdhoorn gravatar image gvdhoorn  ( 2019-12-18 03:09:38 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-12-17 14:41:22 -0500

Seen: 166 times

Last updated: Dec 17 '19