Octomap_msg in Python not working
I am trying to load octomap processed from another node to a node subscribed in python. I have used the octomap_msgs/conversion.h to convert the octomap to msg (fullMapToMsg). But I am not able to read the msg in Python subscriber. Please guide me . The code for subscriber is as follows
#!/usr/bin/env python
import rospy
from octomap_msgs.msg import Octomap
def callback(map_msg):
print "recieved"
def main():
print "initializing node"
rospy.init_node('process_data',anonymous = True)
print "Subcribing nodes"
rospy.Subscriber("/oct_msg",Octomap,callback)
print "finished"
rospy.spin()
if __name__=='__main__':
main()
The output is :
initializing node
Subcribing nodes
finished
Did you ever find a solution to your question? Also, would you be able to post the code you use to turn the octomap to the msg (fullMapToMsg)? I don't fully understand how to use octomap_msgs/conversion.h