-
Notifications
You must be signed in to change notification settings - Fork 329
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
Refactor ROS parametrization #282
Conversation
I am not super excited about this; it goes a bit against our initial philosophy of separating stuff. I will instead have a slightly larger launchfile that merges the two configs. As we know, the parameters of the base pipeline usually work without intervention, so it makes sense that the use of "tweak" is just the ros part in a specific launch file. Also I think it gives more flexibility for developers working on non-ROS framework (if any). As always we can discuss about it |
I'm also not super as well, let me see if I can improve the launch.py to merge the configs there |
@tizianoGuadagnino please re-review. Now I merged the YAML file into the launch.py. The only parameters that are exposed to the ROS CLI are:
Meaning that any of the above lists can be modified in the launch file but also when invoking it with the cli. This way KISS remains configured by default, and from outside we can wire different frames for the tf tree. NOTE that this means that this is not possible anymore (but I guess it never made sense anyway) ros2 launch kiss_icp odometry.launch.py initial_threshold:=0.4 If one needs further customization then one can create a custom launch file to launch the node with the required config: from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node
def generate_launch_description():
return LaunchDescription(
[
Node(
package="kiss_icp",
executable="kiss_icp_node",
name="kiss_icp_node",
output="screen",
remappings=[("pointcloud_topic", LaunchConfiguration("topic"))],
parameters=[
{
"publish_odom_tf": False,
"max_range": 20.0,
},
],
)
]
) |
Mmmm ok, let me drive it to see how it feels ;) |
I got some weird core dump but I guess I'm doing something wrong. The default Python pipeline kind of dies. I will investigate why, but maybe also @benemer can have a look. |
But I'm not modifying the Python pipeline in this PR 🤔 , maybe is this the new pydantic thing? EDIT: It is pydantic, is what @benemer also saw, you have an env variable I think we might want to change our name to kiss-icp/python/kiss_icp/config/parser.py Line 38 in 44d8563
|
Yes, that's due to the new pydantic. Run unset DATA and it works. @nachovizzo, I think the issue is the |
This is kind of dangerous; it can fire back very easily. We should probably handle this in a separate PR. Me and @benemer will have a look. |
Now back to your thing @nachovizzo |
@benemer , @tizianoGuadagnino fix is already on its way ! train of PRs.... 🚅 |
…parameters_to_yaml
…parameters_to_yaml
* Add fixed covariance to odometry msg * Add default value just in case
* Expose registration params to ROS node * More merge conflicts * Default to multithread
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me as well!
* Move ros params from launch file to YAML * Reuse arguments for debug clouds * Rename odometry_node to kiss_icp_node odometry is way to generic * Rename node agin * Voxel size is optional paramter * Reads better like this * New parameter proposal * Add odometry covariance to ros node (PRBonn#283) * Add fixed covariance to odometry msg * Add default value just in case * pre-commit * Expose number of icp iterations in ros (PRBonn#292) * Expose registration params to ROS node * More merge conflicts * Default to multithread
This reverts commit 7b8b095.
* Fix bug where point would match with random point * Use closest neightbor distance * Switch order * Refactor ROS parametrization (#282) * Move ros params from launch file to YAML * Reuse arguments for debug clouds * Rename odometry_node to kiss_icp_node odometry is way to generic * Rename node agin * Voxel size is optional paramter * Reads better like this * New parameter proposal * Add odometry covariance to ros node (#283) * Add fixed covariance to odometry msg * Add default value just in case * pre-commit * Expose number of icp iterations in ros (#292) * Expose registration params to ROS node * More merge conflicts * Default to multithread * Revert "Refactor ROS parametrization (#282)" This reverts commit 7b8b095. * Fix and improve ROS visualization (#285) * Fix this madness Simplify implementation by debugging in an ego-centric way always. Since the KISS-ICP internal map is on the global coordinates, fetch the last ego-centric pose and apply it to the map. Seen from the cloud_frame_id (which is the sensor frame) everything should always work in terms of visualization, no matter the multi-sensor setup. * Now is safe to disable this by default * Simplify, borrow the header from the input pointcloud msg This actually makes the visualization closer to the Python visualizer * Disable path/odom visualization by default In the case where we are not computing the poses in an egocentric world (base_frame != "") and we are not publishing to the TF tree, then the visualization wouldn't make sense. Therefore, disable it by default * Changed my mind If someone doesn't have that particular frame defined, then the visualization won't work. Leave this default * Move responsability of handling tf frames out of Registration (#288) * Move responsability of handling tf frames out of Registration Since with this new changes PublishOdometry is the only member that requieres to know the user specified target-frame, it is not necesary to handle all this bits. This makes the implementation cleaner, easier to read and reduces the lines of code. Now RegisterFrame is a simple callback as few months ago one can read in seconds. * typo * Easier to read * We need this for LookupTransform * Remove unused variable * Revert "Remove unused variable" This reverts commit 424ee90. * Remove unnecessary check * Remove unnecessary exposed utility function from ROS API With this change this function is not exposed (which was never the intention to) to the header. This way we can also "hide" this into a private unnamed namesapces and benefit from inlining the simple function into the translation unit * Revert "Remove unnecessary exposed utility function from ROS API" This reverts commit 23cd7ef. * Revert "Remove unnecessary check" This reverts commit d1dcb48. * merge conflicts :0 * Remove unnecessary exposed utility function from ROS API (#289) * Move responsability of handling tf frames out of Registration Since with this new changes PublishOdometry is the only member that requieres to know the user specified target-frame, it is not necesary to handle all this bits. This makes the implementation cleaner, easier to read and reduces the lines of code. Now RegisterFrame is a simple callback as few months ago one can read in seconds. * typo * Easier to read * We need this for LookupTransform * Remove unused variable * Revert "Remove unused variable" This reverts commit 424ee90. * Remove unnecessary check * Remove unnecessary exposed utility function from ROS API With this change this function is not exposed (which was never the intention to) to the header. This way we can also "hide" this into a private unnamed namesapces and benefit from inlining the simple function into the translation unit * Revert "Remove unnecessary exposed utility function from ROS API" This reverts commit 23cd7ef. * Remove unnecessary exposed utility function from ROS API With this change this function is not exposed (which was never the intention to) to the header. This way we can also "hide" this into a private unnamed namesapces and benefit from inlining the simple function into the translation unit * Revert "Remove unnecessary check" This reverts commit d1dcb48. --------- Co-authored-by: tizianoGuadagnino <[email protected]> * too many merges * Merge Rviz and Python colors * Just make the default construction more clear --------- Co-authored-by: tizianoGuadagnino <[email protected]> * Revert "Fix and improve ROS visualization (#285)" This reverts commit 20797de. --------- Co-authored-by: tizianoGuadagnino <[email protected]> Co-authored-by: Benedikt Mersch <[email protected]> Co-authored-by: Ignacio Vizzo <[email protected]>
Expose KISS parameters in the launch file leaving the ROS arguments exposed through the launch configuration
Besides being a more standard and "ROS"y practice, this will allow us in the future for a more flexible configuration of the ROS NODE. The number of parameters on the ROS side of things is likely to grow, and maintaining this in the launch file will become a mess.This also lets users have a more flexible usage of the ROS node for experimentation, one can now select at launch time with a parameter file to use. In fact, many people are already doing this**Important **: This PR does not change any piece of the implementation, it's just a cosmetic change on how we manipulate the ROS wiring, nothing else