Integrating C++/Python projects into ROS
Hi,
I have a C++ project for robot navigation developed in Visual Studio in simulation. There is currently nothing ROS about it.
I want to first visualize my outputs in Rviz and later send output commands to my robot. The robot already has a ROS end bringup node. Are there any best practices for writing ROS wrappers or tutorials for getting C++/Python code integrated into ROS?
Thank you.
Update: Based on @dornhege comment I'm going to keep the code as separate as possible for now. Adding more details to question.. So I have a main function that generates outputs at a frequency of 4Hz. I have to do some logic and simple manipulation of this data in order to make it Rviz or robot ready.
The way I understand it, I should modify this main function to include a ROS publisher and make it into a ROS node. And then write a ROS listener that I can use to do all the manipulations to publish messages for RViz? I was wondering if it really is that simple and will there by any communication problems? Anything big things I should be wary of?
Thank you.
This is a bit of a generic question. Do you want to turn the code that you have into ROS code or do you want to "only" interface ROS and keep the code as separate as possible?
What are the pros and cons of both?
I think I'll keep the code as separate as possible for now. Question updated.