-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ROSplane code clean up, reorganization, and refactoring #18
Comments
I'm not sure data_viz needs to exist. It seems like the performance is much worse than Plotjuggler, and it is much less capable/versatile than Plotjuggler. It essentially just eats up CPU in my workflow. Should we get rid of it? What are your thoughts @iandareid @bsutherland333 ? |
I think this was Ian's plan to do at some point. Ideally we'd have the plots we need in the ground station RQT gui and could then use plot juggler when we really need to dig into the performance. |
We are merging #9 with this issue Repeating description from other issue: We could also copy over the .clang-format file, script, and workflow from the rosflight_ros_packages or rosflight_firmware repositories to help with this. |
I think we need to have a discussion on the style guide before we make changes to ROSplane. Reading through it, looks like ROSplane was not developed with this sytle guide, some things are only partially implemented, or just not at all. We need to decide what we want to keep and what we want to add, then the GREAT REFACTORING can begin. |
There are also some structure issues I think that exist in the other parts of ROSplane. The files at the very least need to be renamed from |
Another thought to consider: we currently don't use the |
Perhaps we should add a set_current as a service in the path_planner? That way if you wanted you could have pilot manually fly it to a region of interest and then set the waypoint there. This would be particularly useful for JJ's research. |
Refactoring change: In the controller class, there are a couple structs used to define inputs and outputs. Should we change this to use just the message objects that they are sending? This would remove duplicate code between the message definition and the structs in the code. Thoughts? |
The intent of this may have been to keep ROS out of the example classes. @iandareid would know better. |
I have been bothered by the structs for a while, they are present in most of the nodes. They lock in functionality into the estimator_base that I think shouldn't be there. I have thought of removing them as being passed in and making them member variables. I like the idea of making them the same as the message type, but unless I am wrong, I think occasionally there is more data in the structs than the messages. I am not sure. This would be change to the style guide however, they insist that returned objects, or mutated objects should be passed by reference. In any case, a change should be made that would not require someone to modify a random struct in estimator_base to reflect changes in estimator_example. |
That makes sense. However, having structs with the same data as a waypoint message seems worse than having the Having those objects be the message object types also adds some cohesion to what the
If there is, then we should consider if it is important enough to add to the message definition. If not, then we could probably get rid of it or do something different. In most cases, it seems like those structs are primarily used to pass information from the derived classes back up to the base class, which immediately packages them into the message definition and publishes it.
We could also still pass in the variables by reference. It would seem reasonable and clear in the code that the Thoughts? |
I would like to avoid this so you make a compelling point.
I think these sorts of things could be member variables, but we should look at an example of what one of these entries even is.
We save the messages of subscriptions as they come in as message objects as member variables for reference in the loops that take in Should we duel for who's preference is right? |
This includes getting rid of dead code, updating license statements, renaming "example" and "base" classes to something more meaningful and dividing packages more sensibly (does data_viz and rosplane_sim need to exist?).
The text was updated successfully, but these errors were encountered: