[ros-users] combining OpenGL loops with ROS spin()

Bersch Christian (CR/RTC1.1-NA) Christian.Bersch at us.bosch.com
Fri Dec 3 01:40:24 UTC 2010


If you use glut, you can also call

glutPostRedisplay();
glutMainLoopEvent();

in your callback function and use ros::spin();

See camera_robot_self filter in our repository for an example.

Best,
Chris

________________________________
From: ros-users-bounces at code.ros.org [mailto:ros-users-bounces at code.ros.org] On Behalf Of Patrick Mihelich
Sent: Wednesday, December 01, 2010 11:08 AM
To: User discussions
Subject: Re: [ros-users] combining OpenGL loops with ROS spin()

I don't have a complete example, but you should be able to simply drop ros::spinOnce() in your main loop. See the spinning section<http://www.ros.org/wiki/roscpp/Overview/Callbacks%20and%20Spinning> of the roscpp overview.

Cheers,
Patrick

On Wed, Dec 1, 2010 at 4:07 AM, koen buys <koen.buys at mech.kuleuven.be<mailto:koen.buys at mech.kuleuven.be>> wrote:
Does anybody have an example how I can combine the ROS spin() function
with the callback routines of OpenGL?
I have ROS callback routines on messages and I want to send a
generated OpenGL image back in each of those callback routines.

Greetings,

Koen
_______________________________________________
ros-users mailing list
ros-users at code.ros.org<mailto:ros-users at code.ros.org>
https://code.ros.org/mailman/listinfo/ros-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20101203/317e04f0/attachment-0003.html>


More information about the ros-users mailing list