Comments (8)
Sorry work got a bit busy last week. I should be able to get it done this week. Sorry about the delay!
from navigation2.
Am I correct in saying that simply casting the double back down to a float resolve the issue?
return static_cast<unsigned int>(floor(static_cast<float>(theta) / bin_size));
If so, can you submit a PR, that should be easy enough to merge. I'll also take a look when you submit that PR at other implicit double -> float conversions. I did a quick glance and I see a small number of other places that I should be more explicit about that conversion, but this is the only critical one.
From the 3 places that its used, it looks like double really is the valid input type, so we can squash it in the function itself. Two could be made into float
s, but one can't/shouldn't, so its easier to just change it in the method instead.
from navigation2.
Am I correct in saying that simply casting the double back down to a float resolve the issue?
return static_cast<unsigned int>(floor(static_cast<float>(theta) / bin_size));
If so, can you submit a PR, that should be easy enough to merge. I'll also take a look when you submit that PR at other implicit double -> float conversions. I did a quick glance and I see a small number of other places that I should be more explicit about that conversion, but this is the only critical one.
From the 3 places that its used, it looks like double really is the valid input type, so we can squash it in the function itself. Two could be made into
float
s, but one can't/shouldn't, so its easier to just change it in the method instead.
Correct, casting the double to a float resolves the issue.
I can submit a PR but I wonder which branch should it go towards?
from navigation2.
Put it towards main
, but I'll immediately backport to Humble/Iron.
Thanks for the report and soon-to-come PR! 😄
from navigation2.
My pleasure!
I had trouble building main
on my machine but humble
works flawlessly. Would it be ok if I PR into humble
instead?
from navigation2.
All PRs need to be targeted to main and I'll backport to Humble using our tools. If the static cast works in Humble, there's no reason it shouldn't in rolling as well. I looked into this as well and I don't see an issue with that. If your tests pass in Rolling as well (add those unit tests) then we're all good :-)
from navigation2.
Any update? Should be a small change 😄
from navigation2.
Merging imminent, waiting on CI
Thanks @hsong-MLE
from navigation2.
Related Issues (20)
- SmacHybrid planner can crash to segmentation fault HOT 3
- Jazzy Release TODO List
- how to change QoS of cost map easily? HOT 1
- No way of decreasing costmap costs over time? HOT 1
- SmacPlannerHybrid segfault HOT 2
- Robot drives near keepout zones, and stops when "incidentally" enters the keepout zone HOT 4
- resetObstacleHeuristic segfaults on goal not in costmap HOT 5
- Can MPPI follow the path with time stamps? HOT 7
- Bug in findPathFurthestReachedPoint() HOT 1
- user-misconfiguration may cause a heap-buffer-overflow bug in nav2_amcl HOT 8
- Problem with bt_navigator turning off when 2d goal pose in ros2 foxy version HOT 1
- Issue with Chinese paths while loading map configuration files HOT 1
- Incomplete closed subscriber `initial_pose_sub_` in `nav2_amcl` may cause use-after-free bug HOT 7
- Obstacle Avoidance Responsibility in Nav2 HOT 1
- Dynamic footprint support in collision monitor (humble) HOT 5
- Source build failing due to missing packages HOT 4
- MPPI generates undesirable paths HOT 3
- Mppi plugin running HOT 1
- the mechanism defect of `bt_action_server ->on_cleanup()` may lead to UAF HOT 8
- Validate messages in subscription callbacks for critical error in population HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from navigation2.