Ask Your Question
0

How can I round /scan topic values?

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

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 -0600

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 imagetominkoooo ( 2019-12-17 17:51:18 -0600 )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 imagegvdhoorn ( 2019-12-18 03:09:38 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 26 times

Last updated: Dec 17 '19