-
Notifications
You must be signed in to change notification settings - Fork 44
feat(pointcloud projection converter): add new package, pointcloud projection converter #254
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
base: main
Are you sure you want to change the base?
feat(pointcloud projection converter): add new package, pointcloud projection converter #254
Conversation
Signed-off-by: Yamato Ando <yamato.ando@tier4.jp>
Signed-off-by: Yamato Ando <yamato.ando@tier4.jp>
Signed-off-by: Yamato Ando <yamato.ando@tier4.jp>
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
Signed-off-by: Yamato Ando <yamato.ando@tier4.jp>
Signed-off-by: Yamato Ando <yamato.ando@tier4.jp>
map/autoware_pointcloud_projection_converter/src/converter_to_llh.cpp
Outdated
Show resolved
Hide resolved
map/autoware_pointcloud_projection_converter/src/pcd_conversion.cpp
Outdated
Show resolved
Hide resolved
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.
@YamatoAndo According to this guideline
Document structure
Should we add a launch file and a schema, too?
# Find required packages | ||
find_package(autoware_cmake REQUIRED) | ||
autoware_package() | ||
|
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.
@YamatoAndo Do we need to add this?
if (${CMAKE_VERSION} VERSION_LESS "3.1.0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
else ()
set(CMAKE_CXX_STANDARD 17)
endif ()```
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.
fixed d40da31
find_package(PCL REQUIRED) | ||
include_directories( | ||
${PCL_INCLUDE_DIRS} | ||
) | ||
|
||
# Add the sub.cpp file as a library | ||
add_library(converter_lib "src/converter_from_llh.cpp" "src/converter_to_llh.cpp") | ||
|
||
# Create executables | ||
target_include_directories(converter_lib | ||
SYSTEM PUBLIC | ||
${PCL_INCLUDE_DIRS} | ||
) | ||
ament_auto_add_executable(pointcloud_projection_converter "src/pcd_conversion.cpp") | ||
|
||
|
||
# Link the libraries | ||
target_link_libraries(converter_lib yaml-cpp ${PCL_LIBRARIES} ${GeographicLib_LIBRARIES}) | ||
target_link_libraries(pointcloud_projection_converter converter_lib yaml-cpp ${PCL_LIBRARIES} ${GeographicLib_LIBRARIES}) |
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.
@YamatoAndo I think we can shorten this part a bit.
ament_auto_add_library(converter_lib src/converter_from_llh.cpp src/converter_to_llh.cpp)
target_link_libraries(converter_lib ${GeographicLib_LIBRARIES} ${PCL_LIBRARIES})
ament_auto_add_executable(pointcloud_projection_converter src/pcd_conversion.cpp)
target_link_libraries(pointcloud_projection_converter converter_lib yaml-cpp)
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.
## Usage | ||
|
||
```bash | ||
ros2 autoware_pointcloud_projection_converter pointcloud_projection_converter path_to_input_yaml path_to_output_yaml path_to_input_pcd_file path_to_output_pcd_file |
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.
@YamatoAndo Are you missing a 'run' here?
ros2 run autoware_pointcloud_projection_converter pointcloud_projection_converter path_to_input_yaml path_to_output_yaml path_to_input_pcd_file path_to_output_pcd_file
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.
fixed 1083c5e
longitude: yy | ||
``` | ||
|
||
## Dependencies |
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.
@YamatoAndo Regarding dependencies, do we have to add GeographicLib and OpenMP?
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.
fixed 7c716c6
<depend>geographiclib</depend> | ||
<depend>libpcl-all-dev</depend> | ||
<depend>yaml-cpp</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.
@YamatoAndo If you add
<depend>pcl_conversions</depend>
You can shorten the CMakefiles.txt as I suggested above.
Besides, should <depend>libomp-dev</depend>
be added, too?
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.
@@ -0,0 +1,32 @@ | |||
// Copyright 2025 Autoware Foundation |
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.
@YamatoAndo I think .hpp files should be moved to another include/ directory. Something like this
Directory structure
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.
fixed b82d6c1
Signed-off-by: Yamato Ando <yamato.ando@tier4.jp>
Signed-off-by: Yamato Ando <yamato.ando@tier4.jp>
Signed-off-by: Yamato Ando <yamato.ando@tier4.jp>
Signed-off-by: Yamato Ando <yamato.ando@tier4.jp>
Signed-off-by: Yamato Ando <yamato.ando@tier4.jp>
Signed-off-by: Yamato Ando <yamato.ando@tier4.jp>
Signed-off-by: Yamato Ando <yamato.ando@tier4.jp>
Signed-off-by: Yamato Ando <yamato.ando@tier4.jp>
@anhnv3991 OK, I will add them |
Description
This is a tool for converting the coordinate system of a PCD map.
Currently, it only supports converting from the MGRS coordinate system to a Transverse Mercator coordinate system with an arbitrary origin.
How was this PR tested?
prepare a single pcd map like the autoware sample map.
If you are using multiple split pcd maps, you need to merge them into a single pcd map (merge tool).
prepare config files containing the parameters before and after the coordinate transformation. Please refer to the files in the config folder as examples for how to write it.
Run the conversion using the following command:
[optional] Divide the output PCD map (divide tool).
Launch Autoware using the output pcd map and the config file (after the coordinate transformation) to confirm that works correctly.
Notes for reviewers
None.
Effects on system behavior
None.