can i subsribe ultrasonic distane and update a marker in rviz based on that value [closed]

asked 2016-10-24 13:45:08 -0500

anadgopi1994 gravatar image

can i write this subscriber and publisher as a single node. ros::spin(), r.sleep() create problems in my code. can any one help me please.

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by mgruhler
close date 2016-10-25 02:26:08.772457



At least post your code? It's hardly possible to figure out what is going on with the info provided

huanxiner gravatar image huanxiner  ( 2016-10-24 15:06:21 -0500 )edit

A wild guess, without any code but: ros::spin() spins indefinitely, thus never getting to the r.sleep() part which is supposed to be used in conjunction with spinOnce()?

mgruhler gravatar image mgruhler  ( 2016-10-25 01:22:40 -0500 )edit
mgruhler gravatar image mgruhler  ( 2016-10-25 02:26:28 -0500 )edit