-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Refactored amcl code for modularization of motion models(main branch) #2642
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
Merged
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
029e7a1
Delete nav2_amcl directory
poornimajd 0051083
Add files via upload
poornimajd 633df2f
Remove "."
poornimajd efa3446
Update CHANGELOG.rst
poornimajd 2658d7d
Remove redundant code from CMakelists.txt
poornimajd e49608f
Reverted amcl_node.cpp
poornimajd 6d70552
Cleaned up differential_motion_model.cpp
poornimajd 31029da
Update plugins.xml
poornimajd 6270c9f
Cleaned up omni_motion_model.cpp
poornimajd 0331487
Cleaned up motion_model.cpp
poornimajd 3605bce
Delete CHANGELOG.rst
poornimajd 06b3153
Update CMakeLists.txt
poornimajd 95039d8
Update motion_model.hpp
poornimajd 44b1f1c
Add header files via upload
poornimajd b1e2d4f
Update amcl_node.cpp
poornimajd 219e482
Update differential_motion_model.cpp
poornimajd de050eb
Update omni_motion_model.cpp
poornimajd c897217
Update CMakeLists.txt
poornimajd c2cc827
Update differential_motion_model.hpp
poornimajd 8bbc48c
Update motion_model.hpp
poornimajd cdd9015
Update omni_motion_model.hpp
poornimajd 8ee8786
Update amcl_node.cpp
poornimajd 720b71b
Update differential_motion_model.cpp
poornimajd 3018554
Update motion_model.cpp
poornimajd 316cfd2
Update omni_motion_model.cpp
poornimajd b1f9585
Update differential_motion_model.cpp
poornimajd 3ad0984
Update differential_motion_model.hpp
poornimajd e6e18f9
Update motion_model.hpp
poornimajd 5060431
Update omni_motion_model.hpp
poornimajd 209c2fe
Update differential_motion_model.cpp
poornimajd da7333b
Update motion_model.cpp
poornimajd 571b67a
Update omni_motion_model.cpp
poornimajd 86589ef
Update differential_motion_model.hpp
poornimajd 1e5e650
Update motion_model.hpp
poornimajd 6d16170
Update omni_motion_model.hpp
poornimajd 5e839ac
Update motion_model.cpp
poornimajd 5c71f3d
Update motion_model.cpp
poornimajd 2de6a06
Merge branch 'ros-planning:main' into main
poornimajd 15412f2
Update nav2_params.yaml
poornimajd 5deec0c
Update CMakeLists.txt
poornimajd d861b53
Merge branch 'ros-planning:main' into main
poornimajd dc9bd2c
Update nav2_multirobot_params_2.yaml
poornimajd 2a5b35b
Update nav2_multirobot_params_1.yaml
poornimajd 12e5cfa
Update speed_global_params.yaml
poornimajd 71d1f83
Update speed_local_params.yaml
poornimajd 5cdbafb
Update keepout_params.yaml
poornimajd eea8da6
Merge branch 'ros-planning:main' into main
poornimajd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
nav2_amcl/include/nav2_amcl/motion_model/differential_motion_model.hpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| /* | ||
| * Player - One Hell of a Robot Server | ||
| * Copyright (C) 2000 Brian Gerkey & Kasper Stoy | ||
| * gerkey@usc.edu kaspers@robotics.usc.edu | ||
| * | ||
| * This library is free software; you can redistribute it and/or | ||
| * modify it under the terms of the GNU Lesser General Public | ||
| * License as published by the Free Software Foundation; either | ||
| * version 2.1 of the License, or (at your option) any later version. | ||
| * | ||
| * This library is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| * Lesser General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Lesser General Public | ||
| * License along with this library; if not, write to the Free Software | ||
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| * | ||
| */ | ||
|
|
||
| #ifndef DIFFERENTIAL_MOTION_MODEL_HPP | ||
| #define DIFFERENTIAL_MOTION_MODEL_HPP | ||
|
|
||
| #include <sys/types.h> | ||
| #include <math.h> | ||
| #include <algorithm> | ||
| #include "nav2_amcl/motion_model/motion_model.hpp" | ||
| #include "nav2_amcl/angleutils.hpp" | ||
|
|
||
|
|
||
| namespace nav2_amcl | ||
| { | ||
|
|
||
| class DifferentialMotionModel : public nav2_amcl::MotionModel | ||
| { | ||
| public: | ||
| virtual void initialize( | ||
| double alpha1, double alpha2, double alpha3, double alpha4, | ||
| double alpha5); | ||
| virtual void odometryUpdate(pf_t * pf, const pf_vector_t & pose, const pf_vector_t & delta); | ||
|
|
||
| private: | ||
| double alpha1_, alpha2_, alpha3_, alpha4_, alpha5_; | ||
| }; | ||
| } // namespace nav2_amcl | ||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
nav2_amcl/include/nav2_amcl/motion_model/omni_motion_model.hpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| /* | ||
| * Player - One Hell of a Robot Server | ||
| * Copyright (C) 2000 Brian Gerkey & Kasper Stoy | ||
| * gerkey@usc.edu kaspers@robotics.usc.edu | ||
| * | ||
| * This library is free software; you can redistribute it and/or | ||
| * modify it under the terms of the GNU Lesser General Public | ||
| * License as published by the Free Software Foundation; either | ||
| * version 2.1 of the License, or (at your option) any later version. | ||
| * | ||
| * This library is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| * Lesser General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Lesser General Public | ||
| * License along with this library; if not, write to the Free Software | ||
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| * | ||
| */ | ||
|
|
||
| #ifndef DIFFERENTIAL_MOTION_MODEL_HPP | ||
| #define DIFFERENTIAL_MOTION_MODEL_HPP | ||
|
|
||
| #include <sys/types.h> | ||
| #include <math.h> | ||
| #include <algorithm> | ||
| #include "nav2_amcl/motion_model/motion_model.hpp" | ||
| #include "nav2_amcl/angleutils.hpp" | ||
|
|
||
|
|
||
| namespace nav2_amcl | ||
| { | ||
|
|
||
| class OmniMotionModel : public nav2_amcl::MotionModel | ||
| { | ||
| public: | ||
| virtual void initialize( | ||
| double alpha1, double alpha2, double alpha3, double alpha4, | ||
| double alpha5); | ||
| virtual void odometryUpdate(pf_t * pf, const pf_vector_t & pose, const pf_vector_t & delta); | ||
|
|
||
| private: | ||
| double alpha1_, alpha2_, alpha3_, alpha4_, alpha5_; | ||
| }; | ||
| } // namespace nav2_amcl | ||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <library path="motion_models"> | ||
| <class type="nav2_amcl::DifferentialMotionModel" base_class_type="nav2_amcl::MotionModel"> | ||
| <description>This is a diff plugin.</description> | ||
| </class> | ||
| <class type="nav2_amcl::OmniMotionModel" base_class_type="nav2_amcl::MotionModel"> | ||
| <description>This is a omni plugin.</description> | ||
| </class> | ||
| </library> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.