Skip to content
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

feat(ros2agnocast): add topic info cmd base #442

Merged
merged 21 commits into from
Mar 5, 2025

Conversation

TetsuKawa
Copy link
Contributor

@TetsuKawa TetsuKawa commented Feb 27, 2025

Description

This PR adds topic info cmd base.

  • topic_info_agnocast.py: ros2 topic info_agnocast verb. Use functions in topic_info.cpp.
  • topic_info.cpp: Get node_name and qos. But, not implement ioctl yet.

This PR is base branch which to merged from:

After merged display(update 20250304)

$ bash scripts/run_talker
$ bash scripts/run_listener
$ bash scripts/run_listener

2$ ros2 topic info_agnocast -v /my_topic
Type: agnocast_sample_interfaces/msg/DynamicSizeArray

ROS 2 Publisher count: 1
Agnocast Publisher count: 1

Node name: talker_node
Node namespace: /
Topic type: agnocast_sample_interfaces/msg/DynamicSizeArray
Endpoint type: PUBLISHER (Agnocast enabled)
GID: 01.10.6f.78.ef.cc.19.22.6a.d5.d6.8a.00.00.15.03.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RELIABLE
  History (Depth): KEEP_LAST (1)
  Durability: VOLATILE
  Lifespan: Infinite
  Deadline: Infinite
  Liveliness: AUTOMATIC
  Liveliness lease duration: Infinite

ROS 2 Subscription count: 0
Agnocast Subscription count: 2

Node name: listener_node
Node namespace: /
Topic type: agnocast_sample_interfaces/msg/DynamicSizeArray
Endpoint type: SUBSCRIPTION (Agnocast enabled)
QoS profile:
  History (Depth): KEEP_LAST (1)
  Durability: VOLATILE

Node name: listener_node
Node namespace: /
Topic type: agnocast_sample_interfaces/msg/DynamicSizeArray
Endpoint type: SUBSCRIPTION (Agnocast enabled)
QoS profile:
  History (Depth): KEEP_LAST (1)
  Durability: VOLATILE

Related links

How was this PR tested?

  • Autoware (required)
  • bash scripts/e2e_test_1to1_with_ros2sub (required)
  • bash scripts/e2e_test_2to2 (required)
  • sample application

Notes for reviewers

Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
@TetsuKawa TetsuKawa added run-build-test Run build-test in CI and removed run-build-test Run build-test in CI labels Feb 27, 2025
@TetsuKawa TetsuKawa marked this pull request as ready for review March 3, 2025 04:17
@veqcc
Copy link
Contributor

veqcc commented Mar 3, 2025

tetsukawa@NPC2304008:~/agnocast/agnocast$ ros2 topic info_agnocast /sensing/lidar/left/pointcloud_before_sync
Type: sensor_msgs/msg/PointCloud2
Publisher count: 1
(Include Agnocast Publisher count: 1)
Subscription count: 1
(Include Agnocast Subscription count: 1)

この部分、以下の形式とどっちがいいと思います?

tetsukawa@NPC2304008:~/agnocast/agnocast$ ros2 topic info_agnocast /sensing/lidar/left/pointcloud_before_sync
Type: sensor_msgs/msg/PointCloud2
ROS 2 Publisher count: 1
Agnocast Publisher count: 1
ROS 2 Subscription count: 0
Agnocast Subscription count: 1

Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
@TetsuKawa
Copy link
Contributor Author

@Koichi98
topic listの箇所 removeしました。
107db62

Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
@TetsuKawa TetsuKawa force-pushed the feat/add-topic-info-cmd-base branch from 89b47e2 to 59a4832 Compare March 3, 2025 08:36
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
@TetsuKawa TetsuKawa added run-build-test Run build-test in CI and removed run-build-test Run build-test in CI labels Mar 3, 2025
Copy link

github-actions bot commented Mar 3, 2025

------------------------------------------------------------------------------
                           GCC Code Coverage Report
Directory: .
------------------------------------------------------------------------------
File                                       Lines    Exec  Cover   Missing
------------------------------------------------------------------------------
src/agnocastlib/include/agnocast/agnocast.hpp
                                               4       4   100%   
src/agnocastlib/include/agnocast/agnocast_callback_info.hpp
                                              25      22    88%   91,93-94
src/agnocastlib/include/agnocast/agnocast_executor.hpp
                                               1       1   100%   
src/agnocastlib/include/agnocast/agnocast_publisher.hpp
                                              89      57    64%   95,114-116,127,133,137,145-147,150,154-156,163-164,167-169,172-173,176,181,208-209,214-215,218-220,224-225
src/agnocastlib/include/agnocast/agnocast_smart_pointer.hpp
                                              47      47   100%   
src/agnocastlib/src/agnocast.cpp              57      10    17%   19,22,24-30,34-35,38-42,46-47,51-54,57,60,62,65,67-68,73,75-77,80-83,86,88-94,97,107-108
src/agnocastlib/src/agnocast_callback_info.cpp
                                              17      14    82%   29-31
src/agnocastlib/src/agnocast_component_container.cpp
                                              12       0     0%   5,7-8,11-13,16,18-20,22-23
src/agnocastlib/src/agnocast_component_container_mt.cpp
                                              25       0     0%   7,11-12,14-16,18-23,25-27,29-31,34-35,37-39,41-42
src/agnocastlib/src/agnocast_executor.cpp
                                             104      76    73%   20-21,49,60-62,80-83,86,102-104,117-119,129-131,136-139,170,172-174
src/agnocastlib/src/agnocast_multi_threaded_executor.cpp
                                              61      53    86%   20,25-26,33,39-41,110
src/agnocastlib/src/agnocast_publisher.cpp
                                              56       7    12%   10,12,23,26,31,35,37-46,49,52,57-64,73-74,76-79,81-84,86,91,95-96,101,104,106-111,114
src/agnocastlib/src/agnocast_single_threaded_executor.cpp
                                              25      21    84%   16,26-28
src/agnocastlib/src/agnocast_smart_pointer.cpp
                                              18       0     0%   6,9-16,20,23-30
src/agnocastlib/src/agnocast_subscription.cpp
                                              52       9    17%   6-7,9,12,15,19-30,33-37,40,43,47-52,54-59,61,63,66,70-71,73-74
src/agnocastlib/src/agnocast_utils.cpp        29      26    89%   63,65-66
------------------------------------------------------------------------------
TOTAL                                        622     347    55%
------------------------------------------------------------------------------

TetsuKawa and others added 5 commits March 3, 2025 18:23
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
* feat: use ioctl

Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>

* fix: add close fd

Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>

---------

Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
* feat: add topic info cmds

Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>

* fix: use MAX_TOPIC_INFO_RET_NUM

Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>

* fix: redefine MAX_TOPIC_INFO_RET_NUM

Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>

* feat: once copy_to_usr

Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>

* fix: response to cppcheck

Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>

* fix: add kfree

Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>

* tmp: write space

Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>

* feat: pre-commit

Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>

---------

Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
@TetsuKawa TetsuKawa added run-build-test Run build-test in CI and removed run-build-test Run build-test in CI labels Mar 4, 2025
@TetsuKawa TetsuKawa added run-build-test Run build-test in CI and removed run-build-test Run build-test in CI labels Mar 4, 2025
@TetsuKawa TetsuKawa added run-build-test Run build-test in CI and removed run-build-test Run build-test in CI labels Mar 4, 2025
Copy link

github-actions bot commented Mar 4, 2025

------------------------------------------------------------------------------
                           GCC Code Coverage Report
Directory: .
------------------------------------------------------------------------------
File                                       Lines    Exec  Cover   Missing
------------------------------------------------------------------------------
src/agnocastlib/include/agnocast/agnocast.hpp
                                               4       4   100%   
src/agnocastlib/include/agnocast/agnocast_callback_info.hpp
                                              25      22    88%   91,93-94
src/agnocastlib/include/agnocast/agnocast_executor.hpp
                                               1       1   100%   
src/agnocastlib/include/agnocast/agnocast_publisher.hpp
                                              89      57    64%   95,114-116,127,133,137,145-147,150,154-156,163-164,167-169,172-173,176,181,208-209,214-215,218-220,224-225
src/agnocastlib/include/agnocast/agnocast_smart_pointer.hpp
                                              47      47   100%   
src/agnocastlib/src/agnocast.cpp              57      10    17%   19,22,24-30,34-35,38-42,46-47,51-54,57,60,62,65,67-68,73,75-77,80-83,86,88-94,97,107-108
src/agnocastlib/src/agnocast_callback_info.cpp
                                              17      14    82%   29-31
src/agnocastlib/src/agnocast_component_container.cpp
                                              12       0     0%   5,7-8,11-13,16,18-20,22-23
src/agnocastlib/src/agnocast_component_container_mt.cpp
                                              25       0     0%   7,11-12,14-16,18-23,25-27,29-31,34-35,37-39,41-42
src/agnocastlib/src/agnocast_executor.cpp
                                             104      79    76%   20-21,49,60-62,80-83,86,102-104,117-119,129-131,136-139,174
src/agnocastlib/src/agnocast_multi_threaded_executor.cpp
                                              61      53    86%   20,25-26,33,39-41,110
src/agnocastlib/src/agnocast_publisher.cpp
                                              56       7    12%   10,12,23,26,31,35,37-46,49,52,57-64,73-74,76-79,81-84,86,91,95-96,101,104,106-111,114
src/agnocastlib/src/agnocast_single_threaded_executor.cpp
                                              25      21    84%   16,26-28
src/agnocastlib/src/agnocast_smart_pointer.cpp
                                              18       0     0%   6,9-16,20,23-30
src/agnocastlib/src/agnocast_subscription.cpp
                                              52       9    17%   6-7,9,12,15,19-30,33-37,40,43,47-52,54-59,61,63,66,70-71,73-74
src/agnocastlib/src/agnocast_utils.cpp        29      26    89%   63,65-66
------------------------------------------------------------------------------
TOTAL                                        622     350    56%
------------------------------------------------------------------------------

@TetsuKawa TetsuKawa merged commit ad08fce into main Mar 5, 2025
5 checks passed
@TetsuKawa TetsuKawa deleted the feat/add-topic-info-cmd-base branch March 5, 2025 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-build-test Run build-test in CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants