Skip to content

Added test for nav2_dwb_controller / dwb_plugins / LimitedAccelGenerator#2032

Merged
SteveMacenski merged 10 commits intoros-navigation:mainfrom
wilcobonestroo:add-LimitedAccelGenerator-test
Oct 13, 2020
Merged

Added test for nav2_dwb_controller / dwb_plugins / LimitedAccelGenerator#2032
SteveMacenski merged 10 commits intoros-navigation:mainfrom
wilcobonestroo:add-LimitedAccelGenerator-test

Conversation

@wilcobonestroo
Copy link
Copy Markdown
Contributor

Basic Info

Info Please fill out this column
Primary OS tested on Ubuntu

Description of contribution in a few bullet points

  • I added a test with an (invalid) value of the controller_frequency parameter of 0.0

The expected behavior is that the LimitedAccelGenerator prints an error message and the frequency should be set to the default frequency of 20Hz. This should set the test coverage to 100% for the limited_accel_generator.cpp file.

LimitedAccelGeneratorTest gen;
gen.initialize(nh, "dwb");
// Default value should be 0.05
EXPECT_EQ(gen.getAccelerationTime(), 0.05);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Test both ways, so now change the parameter and initalize again to make sure its what it should be with 1 / controller_frequency.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is to make sure that we're testing that this code is doing what we think it is, not only calling to get some default values. It can help us find issues where different inputs give us unexpected outputs due to branching

* Add kinematic parameters tests.

* Solve uncrustify error.
@SteveMacenski
Copy link
Copy Markdown
Member

Rebase once this is merged, this fixes CI #2034

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 13, 2020

Codecov Report

Merging #2032 into main will decrease coverage by 0.24%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2032      +/-   ##
==========================================
- Coverage   81.31%   81.07%   -0.25%     
==========================================
  Files         243      243              
  Lines       11790    11786       -4     
==========================================
- Hits         9587     9555      -32     
- Misses       2203     2231      +28     
Flag Coverage Δ
#project 81.07% <ø> (-0.25%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
smac_planner/include/smac_planner/a_star.hpp 20.00% <ø> (ø)
...anner/include/smac_planner/costmap_downsampler.hpp 100.00% <ø> (ø)
smac_planner/include/smac_planner/node_basic.hpp 100.00% <ø> (+66.66%) ⬆️
nav2_recoveries/plugins/spin.cpp 0.00% <0.00%> (-93.34%) ⬇️
...av2_dwb_controller/dwb_critics/src/oscillation.cpp 68.67% <0.00%> (-20.49%) ⬇️
...v2_recoveries/include/nav2_recoveries/recovery.hpp 83.52% <0.00%> (-5.89%) ⬇️
...v2_util/include/nav2_util/simple_action_server.hpp 89.37% <0.00%> (-2.50%) ⬇️
...av2_costmap_2d/src/footprint_collision_checker.cpp 88.09% <0.00%> (-2.39%) ⬇️
nav2_navfn_planner/src/navfn.cpp 90.86% <0.00%> (-0.49%) ⬇️
nav2_amcl/src/amcl_node.cpp 84.54% <0.00%> (+0.15%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6f9c28...adcd045. Read the comment docs.

@SteveMacenski SteveMacenski merged commit 7bed20d into ros-navigation:main Oct 13, 2020
ruffsl pushed a commit to ruffsl/navigation2 that referenced this pull request Jul 2, 2021
…tor (ros-navigation#2032)

* Added a test with controller_frequency of 0. The controller should get a default frequency of 20.

* Add kinematic parameters test (ros-navigation#2031)

* Add kinematic parameters tests.

* Solve uncrustify error.

* [WIP fixing CI] changing gazebo base to my fork for testing (ros-navigation#2034)

* changing gazebo base to my fork for testing

* adding buffer header per TF2 API changes

* moving header to header

* Adding additional SmacPlanner tests (ros-navigation#2036)

* adding some more tests to smac_planner

* addtl smac tests

* remove unused functions

* adding additional constants and smoothers tests (ros-navigation#2038)

* Added tests for different controller frequencies.

* Added a test with controller_frequency of 0. The controller should get a default frequency of 20.

* Added tests for different controller frequencies.

* Solve uncrustify issue.

Co-authored-by: Steve Macenski <stevenmacenski@gmail.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.

2 participants