Skip to content

feat: acceleration and transport layer#348

Merged
knzo25 merged 21 commits into
tier4:tier4/universefrom
knzo25:feat/cuda_acceleration_and_transport_layer
Apr 28, 2025
Merged

feat: acceleration and transport layer#348
knzo25 merged 21 commits into
tier4:tier4/universefrom
knzo25:feat/cuda_acceleration_and_transport_layer

Conversation

@knzo25
Copy link
Copy Markdown
Contributor

@knzo25 knzo25 commented Nov 25, 2024

Description

This is part of the series of PR related to autowarefoundation/autoware_universe#9722

List of PRs:

Depending on your machine and how many nodes are in a container, the following branch may also be required:
https://github.com/knzo25/launch_ros/tree/fix/load_composable_node
There seems to be a but in ROS where if you send too many services at once some will be lost and ros_launch can not handle that.

Related links

Parent Issue:

  • Link

How was this PR tested?

The sensing/perception pipeline was tested until centerpoint for TIER IV's taxi using the logging simulator.

Notes for reviewers

The main branch that I used for development is feat/cuda_acceleration_and_transport_layer2.
However, the changes were too big so I split the PRs. That being said, development, if any will still be on that branch (and then cherrypicked to the respective PRs), and the review changes will be cherrypicked into the development branch.

Interface changes

An additional topic is added to perform type negotiation:
Example: input/pointcloud -> input/pointcloud and input/pointcloud/cuda

Effects on system behavior

Enabling this preprocessing in the launchers should provide a much reduced latency and cpu usage (at the cost of a higher GPU usage)

vividf and others added 6 commits October 30, 2024 20:18
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
…g and transport layer

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
@knzo25
Copy link
Copy Markdown
Contributor Author

knzo25 commented Nov 25, 2024

Note: this PR will be kept as a draft until #337 it merged, at which point this PR will be reabsed

…cceleration_and_transport_layer

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
…rt_layer

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
@knzo25
Copy link
Copy Markdown
Contributor Author

knzo25 commented Feb 5, 2025

The concatenated PR was merged, so after solving the conflicts and some recent changes, I am opening this PR 🙏

@knzo25 knzo25 marked this pull request as ready for review February 5, 2025 09:57
@knzo25 knzo25 requested review from amadeuszsz and mojomex February 5, 2025 09:58
…es implementation

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
…rt_layer

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
Copy link
Copy Markdown
Contributor

@mojomex mojomex left a comment

Choose a reason for hiding this comment

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

Looking good! I left a few comments on readability/maintainability but that's all I think.
Is there a reason that x2(_gen2) is not covered?

Comment thread aip_xx1_launch/launch/pointcloud_preprocessor.launch.py Outdated
Comment thread common_sensor_launch/launch/nebula_node_container.launch.py
Comment thread common_sensor_launch/launch/nebula_node_container.launch.py
@knzo25
Copy link
Copy Markdown
Contributor Author

knzo25 commented Apr 1, 2025

@mojomex
Thanks for the review. X2 Gen2 was not covered on purpose since it is very difficult to maintain a compatible version of all the PRs (XX1 is better in this sense). As soon as the universe PRs get merged and I can get an easy way to port and test it on X2 Gen2 I will sent the proper PR here

knzo25 added 4 commits April 2, 2025 11:06
Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
…e used with shared containers

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
@knzo25 knzo25 requested a review from mojomex April 2, 2025 04:30
knzo25 added 3 commits April 2, 2025 13:34
…licts

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
…rt_layer

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
@knzo25
Copy link
Copy Markdown
Contributor Author

knzo25 commented Apr 7, 2025

@mojomex
Addressed all comments. I can not ask for a review since the previous comments were not added in the context of a require changes it seems

@knzo25 knzo25 self-assigned this Apr 7, 2025
Copy link
Copy Markdown
Contributor

@mojomex mojomex left a comment

Choose a reason for hiding this comment

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

I'd like the two container_name params to be merged but otherwise LGTM

Comment thread aip_common_sensor_launch/launch/nebula_node_container.launch.py Outdated
…alled pointcloud_container. The difference being whether they are loaded in the global namespace or created in a new container within the lidar namespace

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
@knzo25
Copy link
Copy Markdown
Contributor Author

knzo25 commented Apr 23, 2025

@mojomex
Addressed the last comment.
Since we are close to merging this, I left the cuda acceleration and shared containers as disabled.
To enable them, you just need to change the following settings:

<arg name="use_shared_container" default="false"/>
<arg name="use_cuda_preprocessor" default="false"/>

to

<arg name="use_shared_container" default="true"/>
<arg name="use_cuda_preprocessor" default="true"/>

in aip_xx1_launch/launch/lidar.launch.xml

@knzo25 knzo25 requested a review from mojomex April 23, 2025 04:46
Copy link
Copy Markdown
Contributor

@mojomex mojomex left a comment

Choose a reason for hiding this comment

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

xx1-cuda.webm

Works up until concat. I had to shoehorn the new autoware_universe into pilot-auto.xx1 so I could not test everything (at least autoware_tensorrt_plugins did not build successfully).

Since this is not this PR's fault, I'd say LGTM.

@knzo25 knzo25 removed the request for review from amadeuszsz April 28, 2025 00:40
@knzo25 knzo25 merged commit 22d795b into tier4:tier4/universe Apr 28, 2025
12 checks passed
tier4-autoware-public-bot Bot pushed a commit that referenced this pull request May 19, 2025
* feat: initialize parameters for concatenate

Signed-off-by: vividf <yihsiang.fang@tier4.jp>

* chore: add xx1 gen2 parameters

Signed-off-by: vividf <yihsiang.fang@tier4.jp>

* chore: fix aip x1 parameter

Signed-off-by: vividf <yihsiang.fang@tier4.jp>

* chore: fix x2 parameter

Signed-off-by: vividf <yihsiang.fang@tier4.jp>

* feat: implemented the launcher-side changes for the cuda preprocessing and transport layer

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* feat: accepting variable number of crop boxes now

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: updated the launchers to reflect the newest changes in the nodes implementation

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: refactored names

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: refactored to simply branches

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: added an assert to guarantee that the cuda preprocessor will be used with shared containers

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: added documentation for the new arguments

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: reimplementing the aip naming change instead of resolving conflicts

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: refactored node creation

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* feat: removed the shared_container_name. Now all containers will be called pointcloud_container. The difference being whether they are loaded in the global namespace or created in a new container within the lidar namespace

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

---------

Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
Co-authored-by: vividf <yihsiang.fang@tier4.jp>
Co-authored-by: Yi-Hsiang Fang (Vivid) <146902905+vividf@users.noreply.github.com>
(cherry picked from commit 22d795b)
KYabuuchi pushed a commit that referenced this pull request May 19, 2025
feat: acceleration and transport layer (#348)

* feat: initialize parameters for concatenate



* chore: add xx1 gen2 parameters



* chore: fix aip x1 parameter



* chore: fix x2 parameter



* feat: implemented the launcher-side changes for the cuda preprocessing and transport layer



* feat: accepting variable number of crop boxes now



* chore: updated the launchers to reflect the newest changes in the nodes implementation



* chore: refactored names



* chore: refactored to simply branches



* chore: added an assert to guarantee that the cuda preprocessor will be used with shared containers



* chore: added documentation for the new arguments



* chore: reimplementing the aip naming change instead of resolving conflicts



* chore: refactored node creation



* feat: removed the shared_container_name. Now all containers will be called pointcloud_container. The difference being whether they are loaded in the global namespace or created in a new container within the lidar namespace



---------





(cherry picked from commit 22d795b)

Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
Co-authored-by: Kenzo Lobos Tsunekawa <kenzo.lobos@tier4.jp>
Co-authored-by: vividf <yihsiang.fang@tier4.jp>
Co-authored-by: Yi-Hsiang Fang (Vivid) <146902905+vividf@users.noreply.github.com>
badai-nguyen pushed a commit that referenced this pull request Sep 1, 2025
* feat: initialize parameters for concatenate

Signed-off-by: vividf <yihsiang.fang@tier4.jp>

* chore: add xx1 gen2 parameters

Signed-off-by: vividf <yihsiang.fang@tier4.jp>

* chore: fix aip x1 parameter

Signed-off-by: vividf <yihsiang.fang@tier4.jp>

* chore: fix x2 parameter

Signed-off-by: vividf <yihsiang.fang@tier4.jp>

* feat: implemented the launcher-side changes for the cuda preprocessing and transport layer

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* feat: accepting variable number of crop boxes now

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: updated the launchers to reflect the newest changes in the nodes implementation

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: refactored names

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: refactored to simply branches

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: added an assert to guarantee that the cuda preprocessor will be used with shared containers

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: added documentation for the new arguments

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: reimplementing the aip naming change instead of resolving conflicts

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: refactored node creation

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* feat: removed the shared_container_name. Now all containers will be called pointcloud_container. The difference being whether they are loaded in the global namespace or created in a new container within the lidar namespace

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

---------

Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
Co-authored-by: vividf <yihsiang.fang@tier4.jp>
Co-authored-by: Yi-Hsiang Fang (Vivid) <146902905+vividf@users.noreply.github.com>
badai-nguyen pushed a commit that referenced this pull request Sep 1, 2025
* feat: initialize parameters for concatenate

Signed-off-by: vividf <yihsiang.fang@tier4.jp>

* chore: add xx1 gen2 parameters

Signed-off-by: vividf <yihsiang.fang@tier4.jp>

* chore: fix aip x1 parameter

Signed-off-by: vividf <yihsiang.fang@tier4.jp>

* chore: fix x2 parameter

Signed-off-by: vividf <yihsiang.fang@tier4.jp>

* feat: implemented the launcher-side changes for the cuda preprocessing and transport layer

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* feat: accepting variable number of crop boxes now

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: updated the launchers to reflect the newest changes in the nodes implementation

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: refactored names

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: refactored to simply branches

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: added an assert to guarantee that the cuda preprocessor will be used with shared containers

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: added documentation for the new arguments

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: reimplementing the aip naming change instead of resolving conflicts

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* chore: refactored node creation

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

* feat: removed the shared_container_name. Now all containers will be called pointcloud_container. The difference being whether they are loaded in the global namespace or created in a new container within the lidar namespace

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>

---------

Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
Co-authored-by: vividf <yihsiang.fang@tier4.jp>
Co-authored-by: Yi-Hsiang Fang (Vivid) <146902905+vividf@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants