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 Port #26

Merged
merged 10 commits into from
Aug 30, 2018
Merged

AMCL Port #26

merged 10 commits into from
Aug 30, 2018

Conversation

mhpanah
Copy link
Contributor

@mhpanah mhpanah commented Aug 17, 2018

Completed phase 1 of porting AMCL ROS1 package to ROS2. This phase has all the functionalities except dynamic reconfigure, rosbag, and laser scan subscriber which is equivalent to https://github.com/ros2/navigation/pull/9/files.

@@ -0,0 +1,44 @@
{

Choose a reason for hiding this comment

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

This file shouldn't be checked in.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -0,0 +1,84 @@
cmake_minimum_required(VERSION 3.5)

Choose a reason for hiding this comment

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

There should be a "localization" directory under which we can put multiple implementations of localization. So, I'm thinking:/localization/amcl

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 agree.

find_package(message_filters REQUIRED)
find_package(Boost REQUIRED)
find_package(tf2_geometry_msgs REQUIRED)
find_package(nav_msgs REQUIRED)

Choose a reason for hiding this comment

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

Can we eliminate a dependency on the Navigation1 package?

@@ -0,0 +1,150 @@
/*

Choose a reason for hiding this comment

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

We should consider the scope of the c++ classes and put the code in a corresponding location. For example, is this map class specific to amcl? Specific to localization? Generally useful to other modules as well? Depending on the answer, we would locate this class in a different location.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. I'm planning to work on this on phase 2.

@@ -0,0 +1,198 @@
/*

Choose a reason for hiding this comment

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

Same comment as previous for these various libraries. We can have a /libs directory (or similar name) for those libraries that could be useful to various modules, beyond just localization.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes.

*/
///////////////////////////////////////////////////////////////////////////
//
// Desc: LASER sensor model for AMCL

Choose a reason for hiding this comment

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

Similarly, the sensors should not be specific to localization and should be factored out and placed in an appropriate location.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we will work on refactoring on phase 2.

<build_depend>tf2</build_depend>
<build_depend>util</build_depend>

<!--

Choose a reason for hiding this comment

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

Please remove commented-out sections.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.



// Create a new map
map_t *map_alloc(void)

Choose a reason for hiding this comment

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

Why not simply make this a class instead of using a C interface?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can change the code structure on phase 2.


////////////////////////////////////////////////////////////////////////////
// Draw the occupancy map
void map_draw_occ(map_t *map, rtk_fig_t *fig)

Choose a reason for hiding this comment

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

These could be methods of the map class.

// Extract a single range reading from the map. Unknown cells and/or
// out-of-bound cells are treated as occupied, which makes it easy to
// use Stage bitmap files.
double map_calc_range(map_t *map, double ox, double oy, double oa, double max_range)

Choose a reason for hiding this comment

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

More map methods.

#ifndef LOCALIZATION__AMCLNODE_HPP_
#define LOCALIZATION__AMCLNODE_HPP_

#include <chrono>

Choose a reason for hiding this comment

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

These seems like an excessive amount of includes for this header. The header should only include files required by the interface itself. The implementation (.cpp) can include what's required to implement the interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

return 0;
}

#if 0

Choose a reason for hiding this comment

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

Please remove #if 0 code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Copy link

@mjeronimo mjeronimo left a comment

Choose a reason for hiding this comment

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

Let's create a localization subdirectory and remove the commented-out code before merging.

@mhpanah mhpanah merged commit d6601c8 into ros-navigation:master Aug 30, 2018
@mkhansenbot
Copy link
Collaborator

@mhpanah @mjeronimo - I thought we were going to wait on this until after the ros2_devel branch is merged?

ghost referenced this pull request in logivations/navigation2 Mar 7, 2022
doisyg added a commit to doisyg/navigation2 that referenced this pull request Nov 27, 2023
AUTO-1287 nav2 sync to solve MPPI CI build flag for NUC13
turtlewizard73 pushed a commit to turtlewizard73/navigation2 that referenced this pull request Dec 14, 2024
…os-navigation#26)

* fix: handle transition failures in planner/controller/smoother servers



* adding support for rest of servers + review comments



* Replacing throws with error and failed lifecycle transitions



* fix vel smoother unit tests



* fixing docking server unit testing



* fixing last bits



---------

Signed-off-by: Kemal Bektas <kemal.bektas@node-robotics.com>
Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
Co-authored-by: Kemal Bektas <kemal.bektas@node-robotics.com>
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.

3 participants