I am running a web application that connects to ROS and streams images and 
data from rostopics.  To send and receive ROS data in python with rospy, 
you need to call the init_node() function  (e.g. rospy.init_node('web2py', 
anonymous=True, disable_signals=True) ). This function basically hangs and 
doesn't release, so I create another thread that calls this function so 
that I can send and receive ROS messages in my web2py application, and it 
should only be called once.  The problem is, ROS doesn't provide a check to 
see if I have already called the init_node function.  So the question is 
where to put the initial call to init_node and not call it again during the 
time the server is running.  I would set it up as a session variable, but 
the session can end even if the server is still running and a new session 
would try to call it again.  I could put it in the database, but then it 
would be persistent even after I shut down the server and restarted.  I am 
looking for an init function that gets called when the server starts.  It 
is also good practice to shutdown ROS when I close the server, so I am also 
looking for a shutdown function.  
        

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to