-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Feature/open planner dev #1400
Feature/open planner dev #1400
Conversation
Update ring ground filter with latest implementation Update lidar_kf_contour_track with latest implementation Add op_utilities nodes (op_bag_player, op_data_logger, op_pose2tf) Modify autoware_msgs for OpenPlanner use (CloudCluster, DetectedObject, lane, waypoint) Update UI computing.yaml for the new nodes and modifies parameters Update UI sensing.yaml for updated ring_ground_filter params
Update MappingHelpers with latest modifications Update PlanningHelpers with latest modifications add op_common_param node, for setting OpenPlanner parameter for all related nodes such as lidar_kf_contour_track Improve tracking by including size different in association function Update way_planner, dp_planner for compatibility with new Mapping Modifications, Map format is backward compatible
Fix Global Planning function for the new map modification Add OpenPlanner Simulator for perception, traffic lights, cars Add OpenPlanner new version to replace wp_planner and dp_planner Remove unnecessary files from OpenPlanner libraries Test Global and Local planning Test Tracking node (kf_contour_track) Test Simulation Nodes Test Utility Nodes
… map messages, old behavior still works but from launch file only. Delete way_planner, dp_planner from UI, but they still accessible from roslaunch.
Fix Simulated Vehicle Initialization Test Following Test Obstacle Avoidance Add Visualization information to rviz config file open_planner.rviz
…oware into feature/OpenPlanner-dev
desc : Simulate traffic Signs status for intersections included in the map | ||
cmd : roslaunch op_simulation_package op_signs_simulator.launch | ||
param: op_signs_simulator | ||
- name : op_car_simulator_1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hatem-darweesh There are 5 checkboxes for op_car_simulator. This should be only one here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hatem-darweesh How about @kitsukawa's comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kitsukawa @kfunaoka Only 1 check box for simulated car remaining, I will add multi car simulation option in "Simulation" tab later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hatem-darweesh I've added some comments, but it is difficult to review whole because the diff is very wide range. Would you list reasons why these changes are necessary for each items with comparing with the old implementation?
- OpenPlanner - Global planner
- OpenPlanner - Local Planner
- OpenPlanner - Utilities
- OpenPlanner - Simulator
- lidar_kf_contour_track
) | ||
|
||
|
||
set(CMAKE_CXX_FLAGS "-O2 -Wall ${CMAKE_CXX_FLAGS}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this deletion intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw a PR which adds common compiler flags to all cmake files "autoware_build_flags". so I deleted the special ones
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I should accomplish autoware_build_flags because it sets only -std=c++11 now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other flags are needed only locally for debugging and performance test so I don't want to push them to the server
@@ -0,0 +1,95 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to distribute this file under BSD 3-Clause "New" or "Revised" License?
If yes, please insert the license terms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you give me an example to follow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the license.
https://github.com/CPFL/Autoware/blob/master/LICENSE
An example is here. The year 2015 in it should be replaced with 2018 this year.
https://github.com/CPFL/Autoware/blob/develop/ros/src/computing/perception/detection/vision_detector/packages/vision_ssd_detect/src/vision_ssd_detect.cpp
PlannerHNS::WayPoint max_from_center; | ||
bool bFirst; | ||
|
||
QuarterView(const int& min_a, const int& max_a, const int& index) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to use int or const int instead of const int&.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is less confusing to use one parameter format for both objects and standard types.
and it will be really dangerous and will take plenty of time and testing to change it through the whole OpenPlanner library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I think so too in the point of view where it takes much time and dangerous. I think it is better to be as is in this pull request.
But using const int & instead of int simply incurs piled-up overhead. I think C++ programmers do not confuse about it because they should know C and C++ basically employs pass by value.
|
||
bool UpdateQuarterView(const PlannerHNS::WayPoint& v) | ||
{ | ||
if(v.pos.a <= min_ang || v.pos.a > max_ang) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that clang-format was not used. Did you use clang-format? If no, please use clang-format to all the files you modified. (https://github.com/CPFL/Autoware/wiki/Contribution-Rules#ros-c-coding)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will apply it later with different PR, after merging this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hatem-darweesh Your choice is the best method.
namespace ContourTrackerNS | ||
{ | ||
|
||
#define DEBUG_TRACKER 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to use constexpr instead of #define. (https://en.cppreference.com/w/cpp/language/constexpr)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add this as ToDo, I need to check for each #define whether it is a compiler directive or a constant. so it will take long time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hatem-darweesh NP :)
f.pTrack->UpdatePathAndIndex(obj.predTrajectories.at(f.new_index), f.new_index); | ||
|
||
bool bFound = false; | ||
for(unsigned int k=0; k < check_list.size(); k++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to use standard functions. It seems that this loop can be replaced by std::find.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
personal preference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hatem-darweesh NP. But std::find can reduce the number of lines 1/9 (one ninth) where we develop, review, and maintain. If there are ten loops finding an element, it can reduce 81 (= 90 - 9) lines in the Autoware code base. If you like it, please use it :)
- The number of lines of this loop is 9 (from Line 688 to 695).
- The number of lines of std::find is 1.
|
||
std::vector<PlannerHNS::GPSPoint> PolygonGenerator::EstimateClusterPolygon(const pcl::PointCloud<pcl::PointXYZ>& cluster, const PlannerHNS::GPSPoint& original_centroid, PlannerHNS::GPSPoint& new_centroid, const double& polygon_resolution) | ||
{ | ||
for(unsigned int i=0; i < m_Quarters.size(); i++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use range-for.
https://en.cppreference.com/w/cpp/language/range-for
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
personal preference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as #1400 (comment)
|
||
#ifndef PLANNINGHELPERS_H_ | ||
#define PLANNINGHELPERS_H_ | ||
|
||
#include <math.h> | ||
//#include <math.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be deleted. Unnecessary comments will be junk.
} | ||
} | ||
|
||
int BehaviorPrediction::FromIndicatorToNumber(const PlannerHNS::LIGHT_INDICATOR& indi) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are FromIndicatorToNumber and FromNumbertoIndicator necessary? Is it impossible to use enum value itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the compiler give me an error casting from int to the enumerator, so I create a function to convert from one to another and the vice versa , just to be consistent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hatem-darweesh Is it just a design problem or an unavoidable problem? Basically, it seems that it is not a good idea to have the same type of data (Particle::indicator and the data returned from BehaviorPrediction::FromNumbertoIndicator) with different types (int and lannerHNS::LIGHT_INDICATOR, respectively).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Particle::indicator is defined as int in autoware_msgs::DetectedObject. It is difficult to avoid.
double BehaviorPrediction::CalcIndicatorWeight(PlannerHNS::LIGHT_INDICATOR p_ind, PlannerHNS::LIGHT_INDICATOR obj_ind) | ||
{ | ||
if((obj_ind == PlannerHNS::INDICATOR_LEFT || obj_ind == PlannerHNS::INDICATOR_RIGHT || obj_ind == PlannerHNS::INDICATOR_NONE) && p_ind == obj_ind) | ||
return 0.99; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove magic numbers as much as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part (Prediction) is under development (research work) , all numbers will be removed or added as parameters soon.
@hatem-darweesh My comments are general principles. Would you try to apply the principles to the other places? |
<!-- <run_depend>message_runtime</run_depend> --> | ||
<!-- Use test_depend for packages you need only for testing: --> | ||
<!-- <test_depend>gtest</test_depend> --> | ||
<buildtool_depend>catkin</buildtool_depend> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add buildtool_depend of autoware_build_flags.
https://github.com/CPFL/Autoware/wiki/Quality-Control
<version>0.0.1</version> | ||
<description>The OpenPlanner Global Planning package</description> | ||
|
||
<!-- One maintainer tag required, multiple allowed, one person per tag --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please delete unnecessary comments.
project(op_global_planner) | ||
|
||
find_package(catkin REQUIRED COMPONENTS | ||
geometry_msgs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add autoware_build_flags.
https://github.com/CPFL/Autoware/wiki/Quality-Control
Sorry for mistake. It's better to use clang format after all codes are reviewed because it make the history unreadable. |
pass pointer as "const" for function "DeleteFromList" in both (BehaviorPrediction and LLP) classes
Delete useless comment for including math.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hatem-darweesh Though I've made a lot of comments, my mandatory requests now are:
- Inserting license information into *.{h,cpp} files as mentioned at Feature/open planner dev #1400 (comment).
- Inserting autoware_build_flags into package.xml and CMakeLists.txt as shown at Feature/open planner dev #1400 (review)
- Updating the headline of this pull request to show what are different from before and why they are necessary. Your slide and descriptions will help us to understand your work.
@hatem-darweesh Your work is great. To approve this pull request, please be reviewed by aohsato from other aspects. I think I am not the best person who reviews this pull request. In your future work, it's better to make pull requests as accordingly-small as possible. Stepwise pull requests will help reviewers. Enough review will improve your work more and more. I think small feedback loop is better than large feedback loop for you and for reviews. |
I've added the following item into my review comment (#1400 (review)).
|
…esting Only one simulated car available in the runtime manager update for copywrite note insert autoware_build_flags to new nodes
@kfunaoka can you check your review comments and current changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hatem-darweesh I've confirmed that all my mandatory request are OK. I might find an item that you want to change.
) | ||
|
||
|
||
set(CMAKE_CXX_FLAGS "-O2 -Wall ${CMAKE_CXX_FLAGS}") | ||
find_package(OpenCV REQUIRED) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- set(CMAKE_CXX_FLAGS "-O2 -Wall ${CMAKE_CXX_FLAGS}")
Should we revert this line because you said
The other flags are needed only locally for debugging and performance test so I don't want to push them to the server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kfunaoka I will add to different PR if necessary
…ner-dev Feature/open planner dev
Status
** DEVELOPMENT**
Description
Add OpenPlanner new Modifications and Tools to Autoware develop branch.
Remove Old OpenPlanner (dp_planner, way_planner)
Add readme for each module
**For More Details about the updated OpenPlanner, interface description and how to test **
OpenPlanner Nodes.pdf
Steps to Test or Reproduce
Follow README files and Demo Video