Conversation
|
just a control question, what's the use-case that requires one node to ad-hoc switch the LOS-flavor to use? I'm not too too familiar with the full system / intended use here |
| // again i dont know if i should have them here or just in the functions | ||
| double pi_h_{}; | ||
| double pi_v_{}; | ||
| Eigen::AngleAxisd rotation_y_{0.0, Eigen::Vector3d::UnitY()}; | ||
| Eigen::AngleAxisd rotation_z_{0.0, Eigen::Vector3d::UnitZ()}; |
There was a problem hiding this comment.
It is a fair point, and it makes sense to have just have them as input/output for the calculations
|
To fix the build errors you could try to add |
|
Thank you @Andeshog for the comments, i will look into all of them after i am done with my exmas. replying to @chrstrom : This explanation is from my understanding, so please do correct me if something doesn't feal right! |
d461e98 to
dddd334
Compare
Addition:
From last year, this package was only for Adaptive LOS guidance. To make a LOS library that supports multiple types of LOS-based guidance and is robust enough to allow adding other guidance systems as well, my primary focus has been to implement more LOS-based methods first. As of now, I have added Proportional LOS and Integral LOS, in addition to the Adaptive LOS from last year.
Restructure:
I have also worked on restructuring the existing Adaptive ROS node and YAML file.
ros_node:
To create a system capable of changing the LOS method in the middle of a mission or segment, I needed to restructure the file named los_guidance_ros.cpp. Previously, this file only ran Adaptive LOS, but now it has been modified so that it can receive a method selection from a service called SetLosMode.srv and switch between all available LOS methods within a single running node. Together with our mentor Anders, we planned how the new structure should look and implemented it accordingly.
A new header file named types.hpp has been added, which holds all the shared data structures used in the code. All parts of the code are now within the same namespace, vortex::guidance::los, making it easier to reference and maintain consistency across different components.
YAML:
The parameter file has been restructured to use the default YAML format. This was done to clearly separate ROS parameters from code-based parameters. The remaining files such as CMakeLists.txt, package.xml, and the launch file have also been updated accordingly.
Test:
There was a test file for Adaptive LOS from last year. Following the same concept, I created equivalent tests for all the new LOS methods. Since there are now multiple test files, I also added a main test file that contains the main function to run all tests together.
For now, if we want to run a single test, it must be done using ROS2 commands in the terminal, but this can be improved later to make it simpler.
All test invocation:
colcon test --packages-select los_guidance --event-handlers console_direct+colcon test-result --verboseExample single-test invocation:
colcon test --packages-select los_guidance --ctest-args -R ProportionalLosTestPlan further:
I plan to run more tests to ensure that all LOS methods work as expected. I also want to make further adjustments so that the ROS node can either remember or reset the Adaptive and Integral values. It would be useful to retain these values within the same segment but reset them when starting a new one.
Lastly, I plan to add more LOS methods, and if time permits, explore creating a library for other types of guidance methods as well.
Summary:
This PR completes the first stage of the LOS guidance library as planned. It introduces two new LOS methods (Proportional LOS and Integral LOS) and provides a clear separation between different methods. Additionally, the ROS2 node has been restructured to support runtime method switching, with updated configuration and the addition of unit tests for each method.
The node is ready to run, it builds and launches, but I still need to perform more testing to confirm that all methods work correctly and continue developing new LOS variants in the next phase.