Skip to content
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

Amcl refactorization #77

Merged
merged 6 commits into from
Sep 14, 2018
Merged

Conversation

mhpanah
Copy link
Contributor

@mhpanah mhpanah commented Sep 10, 2018

  1. Created map directory and transfered map.h header file to map directory to be consistent with other libraries.
  2. Updated ament_target_dependencies for costmap to contain correct dependencies.
  3. Commented out unused parameters from cpp file to eliminate compiler warnings
  4. For C files had to cast unused parameters with void to eliminate warnings.
  5. TODO: decide what to do with [-Wpedantic].

Copy link
Contributor

@bpwilcox bpwilcox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At first I was unsure whether you could leave out certain function parameters that are being commented out, but it appears they are from an interface. On ROS callbacks, I'm not positive that all parameters are required (ex. request_header), but I think it's okay for now

Copy link
Collaborator

@mkhansenbot mkhansenbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I noticed amcl_node.cpp uses the boost library (line 890). We should change that to using the standard library instead, but that can be in another refactor. Can we file an issue or track that somewhere?

@@ -69,6 +69,7 @@ void map_free(map_t *map)
// Get the cell at the given point
map_cell_t *map_get_cell(map_t *map, double ox, double oy, double oa)
{
(void)oa;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is 'oa' even a parameter if it isn't used? Should it be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to not change the code for this commit and start modifying the code in next phase by removing all the unnecessary parameters, changing functions, classes, etc.

@@ -472,6 +471,7 @@ int pf_resample_limit(pf_t *pf, int k)
// Re-compute the cluster statistics for a sample set
void pf_cluster_stats(pf_t *pf, pf_sample_set_t *set)
{
(void)pf;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should 'pf' be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above.

@@ -185,6 +185,7 @@ int pf_kdtree_get_cluster(pf_kdtree_t *self, pf_vector_t pose)
// Compare keys to see if they are equal
int pf_kdtree_equal(pf_kdtree_t *self, int key_a[], int key_b[])
{
(void)self;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should 'self' be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above.

@mhpanah
Copy link
Contributor Author

mhpanah commented Sep 12, 2018

@mkhansen-intel - Agreed. I need to create an issue to de-boostify the code to meet ROS2 Developer guideline. That was my plan.

@mkhansenbot
Copy link
Collaborator

@mhpanah - the last change looks good to me. Are there any other pending changes? If not and you have issues open for remaining refactors & clean ups, I think we can merge this.

@mhpanah
Copy link
Contributor Author

mhpanah commented Sep 14, 2018

I've created an issue to eliminate the usage of boost library from the code.

@mhpanah mhpanah closed this Sep 14, 2018
@mhpanah mhpanah reopened this Sep 14, 2018
@mhpanah mhpanah merged commit 623cc53 into ros-navigation:master Sep 14, 2018
ghost pushed a commit to logivations/navigation2 that referenced this pull request Mar 7, 2022
* AGVFM-555 use parallel node in pallet pickup, to ensure smooth operation.

* remove unnecessary spin recovery node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants