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

Launch cooperative perception nodes #2195

Merged
merged 3 commits into from
Nov 21, 2023
Merged

Conversation

MishkaMN
Copy link
Contributor

@MishkaMN MishkaMN commented Nov 21, 2023

PR Details

Description

This PR launches the cp nodes in carma-platform and connects the topics. Resulting nodes and topic connections look as follows, now:

carma@ubuntu:/$ ros2 lifecycle get | grep environment
1700556814.607293 [0]       ros2: using network interface ens33 (udp/192.168.1.159) selected arbitrarily from: ens33, docker0
/environment/bounding_box_converter: active [3]
/environment/carma_wm_broadcaster: active [3]
/environment/cp_external_object_list_to_detection_list_node: active [3]
/environment/cp_external_object_list_to_sdsm_node: active [3]
/environment/cp_host_vehicle_filter_node: active [3]
/environment/cp_multiple_object_tracker_node: active [3]
/environment/cp_sdsm_to_detection_list_node: active [3]
/environment/cp_track_list_to_external_object_list_node: active [3]
/environment/environment_perception_controller: active [3]
/environment/external_object: active [3]
/environment/lanelet2_map_loader: active [3]
/environment/lanelet2_map_loader_container: active [3]
/environment/lanelet2_map_visualization: active [3]
/environment/lanelet2_map_visualization_container: active [3]
/environment/lidar_frame_transformer: active [3]
/environment/lidar_to_map_frame_transformer: active [3]
/environment/motion_computation_node: active [3]
/environment/motion_prediction_visualizer: active [3]
/environment/object_visualizer_node: active [3]
/environment/perception_points_filter_container: active [3]
/environment/points_map_filter: active [3]
/environment/roadway_objects_node: active [3]
/environment/traffic_incident_parser_node: active [3]
carma@ubuntu:/$ ros2 node info /environment/cp_external_object_list_to_detection_list_node
/environment/cp_external_object_list_to_detection_list_node
  Subscribers:
    /environment/external_objects: carma_perception_msgs/msg/ExternalObjectList
    /environment/georeference: std_msgs/msg/String
    /parameter_events: rcl_interfaces/msg/ParameterEvent
  Publishers:
    /environment/cp_external_object_list_to_detection_list_node/transition_event: lifecycle_msgs/msg/TransitionEvent
    /environment/full_detection_list: carma_cooperative_perception_interfaces/msg/DetectionList
    /parameter_events: rcl_interfaces/msg/ParameterEvent
    /rosout: rcl_interfaces/msg/Log
    /system_alert: carma_msgs/msg/SystemAlert
  Service Servers:
    /environment/cp_external_object_list_to_detection_list_node/change_state: lifecycle_msgs/srv/ChangeState
    /environment/cp_external_object_list_to_detection_list_node/describe_parameters: rcl_interfaces/srv/DescribeParameters
    /environment/cp_external_object_list_to_detection_list_node/get_available_states: lifecycle_msgs/srv/GetAvailableStates
    /environment/cp_external_object_list_to_detection_list_node/get_available_transitions: lifecycle_msgs/srv/GetAvailableTransitions
    /environment/cp_external_object_list_to_detection_list_node/get_parameter_types: rcl_interfaces/srv/GetParameterTypes
    /environment/cp_external_object_list_to_detection_list_node/get_parameters: rcl_interfaces/srv/GetParameters
    /environment/cp_external_object_list_to_detection_list_node/get_state: lifecycle_msgs/srv/GetState
    /environment/cp_external_object_list_to_detection_list_node/get_transition_graph: lifecycle_msgs/srv/GetAvailableTransitions
    /environment/cp_external_object_list_to_detection_list_node/list_parameters: rcl_interfaces/srv/ListParameters
    /environment/cp_external_object_list_to_detection_list_node/set_parameters: rcl_interfaces/srv/SetParameters
    /environment/cp_external_object_list_to_detection_list_node/set_parameters_atomically: rcl_interfaces/srv/SetParametersAtomically
  Service Clients:

  Action Servers:

  Action Clients:

carma@ubuntu:/$ ros2 node info /environment/cp_external_object_list_to_sdsm_node
/environment/cp_external_object_list_to_sdsm_node
  Subscribers:
    /environment/external_objects: carma_perception_msgs/msg/ExternalObjectList
    /environment/georeference: std_msgs/msg/String
    /localization/current_pose: geometry_msgs/msg/PoseStamped
    /parameter_events: rcl_interfaces/msg/ParameterEvent
  Publishers:
    /environment/cp_external_object_list_to_sdsm_node/transition_event: lifecycle_msgs/msg/TransitionEvent
    /message/outgoing_sdsm: carma_v2x_msgs/msg/SensorDataSharingMessage
    /parameter_events: rcl_interfaces/msg/ParameterEvent
    /rosout: rcl_interfaces/msg/Log
    /system_alert: carma_msgs/msg/SystemAlert
  Service Servers:
    /environment/cp_external_object_list_to_sdsm_node/change_state: lifecycle_msgs/srv/ChangeState
    /environment/cp_external_object_list_to_sdsm_node/describe_parameters: rcl_interfaces/srv/DescribeParameters
    /environment/cp_external_object_list_to_sdsm_node/get_available_states: lifecycle_msgs/srv/GetAvailableStates
    /environment/cp_external_object_list_to_sdsm_node/get_available_transitions: lifecycle_msgs/srv/GetAvailableTransitions
    /environment/cp_external_object_list_to_sdsm_node/get_parameter_types: rcl_interfaces/srv/GetParameterTypes
    /environment/cp_external_object_list_to_sdsm_node/get_parameters: rcl_interfaces/srv/GetParameters
    /environment/cp_external_object_list_to_sdsm_node/get_state: lifecycle_msgs/srv/GetState
    /environment/cp_external_object_list_to_sdsm_node/get_transition_graph: lifecycle_msgs/srv/GetAvailableTransitions
    /environment/cp_external_object_list_to_sdsm_node/list_parameters: rcl_interfaces/srv/ListParameters
    /environment/cp_external_object_list_to_sdsm_node/set_parameters: rcl_interfaces/srv/SetParameters
    /environment/cp_external_object_list_to_sdsm_node/set_parameters_atomically: rcl_interfaces/srv/SetParametersAtomically
  Service Clients:

  Action Servers:

  Action Clients:

carma@ubuntu:/$ ros2 node info /environment/cp_host_vehicle_filter_node
/environment/cp_host_vehicle_filter_node
  Subscribers:
    /environment/full_detection_list: carma_cooperative_perception_interfaces/msg/DetectionList
    /localization/current_pose: geometry_msgs/msg/PoseStamped
    /parameter_events: rcl_interfaces/msg/ParameterEvent
  Publishers:
    /environment/cp_host_vehicle_filter_node/transition_event: lifecycle_msgs/msg/TransitionEvent
    /environment/filtered_detection_list: carma_cooperative_perception_interfaces/msg/DetectionList
    /parameter_events: rcl_interfaces/msg/ParameterEvent
    /rosout: rcl_interfaces/msg/Log
    /system_alert: carma_msgs/msg/SystemAlert
  Service Servers:
    /environment/cp_host_vehicle_filter_node/change_state: lifecycle_msgs/srv/ChangeState
    /environment/cp_host_vehicle_filter_node/describe_parameters: rcl_interfaces/srv/DescribeParameters
    /environment/cp_host_vehicle_filter_node/get_available_states: lifecycle_msgs/srv/GetAvailableStates
    /environment/cp_host_vehicle_filter_node/get_available_transitions: lifecycle_msgs/srv/GetAvailableTransitions
    /environment/cp_host_vehicle_filter_node/get_parameter_types: rcl_interfaces/srv/GetParameterTypes
    /environment/cp_host_vehicle_filter_node/get_parameters: rcl_interfaces/srv/GetParameters
    /environment/cp_host_vehicle_filter_node/get_state: lifecycle_msgs/srv/GetState
    /environment/cp_host_vehicle_filter_node/get_transition_graph: lifecycle_msgs/srv/GetAvailableTransitions
    /environment/cp_host_vehicle_filter_node/list_parameters: rcl_interfaces/srv/ListParameters
    /environment/cp_host_vehicle_filter_node/set_parameters: rcl_interfaces/srv/SetParameters
    /environment/cp_host_vehicle_filter_node/set_parameters_atomically: rcl_interfaces/srv/SetParametersAtomically
  Service Clients:

  Action Servers:

  Action Clients:

carma@ubuntu:/$ ros2 node info /environment/cp_multiple_object_tracker_node
/environment/cp_multiple_object_tracker_node
  Subscribers:
    /environment/filtered_detection_list: carma_cooperative_perception_interfaces/msg/DetectionList
    /parameter_events: rcl_interfaces/msg/ParameterEvent
  Publishers:
    /environment/cooperative_perception_track_list: carma_cooperative_perception_interfaces/msg/TrackList
    /environment/cp_multiple_object_tracker_node/transition_event: lifecycle_msgs/msg/TransitionEvent
    /parameter_events: rcl_interfaces/msg/ParameterEvent
    /rosout: rcl_interfaces/msg/Log
    /system_alert: carma_msgs/msg/SystemAlert
  Service Servers:
    /environment/cp_multiple_object_tracker_node/change_state: lifecycle_msgs/srv/ChangeState
    /environment/cp_multiple_object_tracker_node/describe_parameters: rcl_interfaces/srv/DescribeParameters
    /environment/cp_multiple_object_tracker_node/get_available_states: lifecycle_msgs/srv/GetAvailableStates
    /environment/cp_multiple_object_tracker_node/get_available_transitions: lifecycle_msgs/srv/GetAvailableTransitions
    /environment/cp_multiple_object_tracker_node/get_parameter_types: rcl_interfaces/srv/GetParameterTypes
    /environment/cp_multiple_object_tracker_node/get_parameters: rcl_interfaces/srv/GetParameters
    /environment/cp_multiple_object_tracker_node/get_state: lifecycle_msgs/srv/GetState
    /environment/cp_multiple_object_tracker_node/get_transition_graph: lifecycle_msgs/srv/GetAvailableTransitions
    /environment/cp_multiple_object_tracker_node/list_parameters: rcl_interfaces/srv/ListParameters
    /environment/cp_multiple_object_tracker_node/set_parameters: rcl_interfaces/srv/SetParameters
    /environment/cp_multiple_object_tracker_node/set_parameters_atomically: rcl_interfaces/srv/SetParametersAtomically
  Service Clients:

  Action Servers:

  Action Clients:

carma@ubuntu:/$ ros2 node info /environment/cp_sdsm_to_detection_list_node
/environment/cp_sdsm_to_detection_list_node
  Subscribers:
    /message/incoming_sdsm: carma_v2x_msgs/msg/SensorDataSharingMessage
    /parameter_events: rcl_interfaces/msg/ParameterEvent
  Publishers:
    /environment/cp_sdsm_to_detection_list_node/transition_event: lifecycle_msgs/msg/TransitionEvent
    /environment/full_detection_list: carma_cooperative_perception_interfaces/msg/DetectionList
    /parameter_events: rcl_interfaces/msg/ParameterEvent
    /rosout: rcl_interfaces/msg/Log
    /system_alert: carma_msgs/msg/SystemAlert
  Service Servers:
    /environment/cp_sdsm_to_detection_list_node/change_state: lifecycle_msgs/srv/ChangeState
    /environment/cp_sdsm_to_detection_list_node/describe_parameters: rcl_interfaces/srv/DescribeParameters
    /environment/cp_sdsm_to_detection_list_node/get_available_states: lifecycle_msgs/srv/GetAvailableStates
    /environment/cp_sdsm_to_detection_list_node/get_available_transitions: lifecycle_msgs/srv/GetAvailableTransitions
    /environment/cp_sdsm_to_detection_list_node/get_parameter_types: rcl_interfaces/srv/GetParameterTypes
    /environment/cp_sdsm_to_detection_list_node/get_parameters: rcl_interfaces/srv/GetParameters
    /environment/cp_sdsm_to_detection_list_node/get_state: lifecycle_msgs/srv/GetState
    /environment/cp_sdsm_to_detection_list_node/get_transition_graph: lifecycle_msgs/srv/GetAvailableTransitions
    /environment/cp_sdsm_to_detection_list_node/list_parameters: rcl_interfaces/srv/ListParameters
    /environment/cp_sdsm_to_detection_list_node/set_parameters: rcl_interfaces/srv/SetParameters
    /environment/cp_sdsm_to_detection_list_node/set_parameters_atomically: rcl_interfaces/srv/SetParametersAtomically
  Service Clients:

  Action Servers:

  Action Clients:

carma@ubuntu:/$ ros2 node info /environment/cp_track_list_to_external_object_list_node
/environment/cp_track_list_to_external_object_list_node
  Subscribers:
    /environment/cooperative_perception_track_list: carma_cooperative_perception_interfaces/msg/TrackList
    /parameter_events: rcl_interfaces/msg/ParameterEvent
  Publishers:
    /environment/cp_track_list_to_external_object_list_node/transition_event: lifecycle_msgs/msg/TransitionEvent
    /environment/fused_external_objects: carma_perception_msgs/msg/ExternalObjectList
    /parameter_events: rcl_interfaces/msg/ParameterEvent
    /rosout: rcl_interfaces/msg/Log
    /system_alert: carma_msgs/msg/SystemAlert
  Service Servers:
    /environment/cp_track_list_to_external_object_list_node/change_state: lifecycle_msgs/srv/ChangeState
    /environment/cp_track_list_to_external_object_list_node/describe_parameters: rcl_interfaces/srv/DescribeParameters
    /environment/cp_track_list_to_external_object_list_node/get_available_states: lifecycle_msgs/srv/GetAvailableStates
    /environment/cp_track_list_to_external_object_list_node/get_available_transitions: lifecycle_msgs/srv/GetAvailableTransitions
    /environment/cp_track_list_to_external_object_list_node/get_parameter_types: rcl_interfaces/srv/GetParameterTypes
    /environment/cp_track_list_to_external_object_list_node/get_parameters: rcl_interfaces/srv/GetParameters
    /environment/cp_track_list_to_external_object_list_node/get_state: lifecycle_msgs/srv/GetState
    /environment/cp_track_list_to_external_object_list_node/get_transition_graph: lifecycle_msgs/srv/GetAvailableTransitions
    /environment/cp_track_list_to_external_object_list_node/list_parameters: rcl_interfaces/srv/ListParameters
    /environment/cp_track_list_to_external_object_list_node/set_parameters: rcl_interfaces/srv/SetParameters
    /environment/cp_track_list_to_external_object_list_node/set_parameters_atomically: rcl_interfaces/srv/SetParametersAtomically
  Service Clients:

  Action Servers:

  Action Clients:

Related GitHub Issue

#2185

Related Jira Key

CDAR-449

Motivation and Context

How Has This Been Tested?

Local integration tested with develop-development images

Types of changes

  • Defect fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that cause existing functionality to change)

Checklist:

  • I have added any new packages to the sonar-scanner.properties file
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@MishkaMN MishkaMN requested a review from adamlm November 21, 2023 08:59
@MishkaMN MishkaMN added the enhancement New feature or request label Nov 21, 2023
@MishkaMN MishkaMN self-assigned this Nov 21, 2023
@MishkaMN
Copy link
Contributor Author

carma@ubuntu:/$ ros2 topic info outgoing_sdsm
Unknown topic 'outgoing_sdsm'
carma@ubuntu:/$ ros2 topic info /message/outgoing_sdsm
Type: carma_v2x_msgs/msg/SensorDataSharingMessage
Publisher count: 1
Subscription count: 1
carma@ubuntu:/$ ros2 topic info /message/outgoing_sdsm --verbose
Type: carma_v2x_msgs/msg/SensorDataSharingMessage

Publisher count: 1

Node name: cp_external_object_list_to_sdsm_node
Node namespace: /environment
Topic type: carma_v2x_msgs/msg/SensorDataSharingMessage
Endpoint type: PUBLISHER
GID: b1.24.10.01.64.ab.c5.0a.0e.8d.3b.95.00.00.b1.03.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_VOLATILE
  Lifespan: 9223372036854775807 nanoseconds
  Deadline: 9223372036854775807 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 9223372036854775807 nanoseconds

Subscription count: 1

Node name: j2735_convertor_node
Node namespace: /message
Topic type: carma_v2x_msgs/msg/SensorDataSharingMessage
Endpoint type: SUBSCRIPTION
GID: e0.41.10.01.48.3b.dd.cf.54.92.c9.60.00.00.cb.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_VOLATILE
  Lifespan: 9223372036854775807 nanoseconds
  Deadline: 9223372036854775807 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 9223372036854775807 nanoseconds

@MishkaMN
Copy link
Contributor Author

carma@ubuntu:/$ ros2 topic info /message/incoming_sdsm --verbose
Type: carma_v2x_msgs/msg/SensorDataSharingMessage

Publisher count: 1

Node name: j2735_convertor_node
Node namespace: /message
Topic type: carma_v2x_msgs/msg/SensorDataSharingMessage
Endpoint type: PUBLISHER
GID: e0.41.10.01.48.3b.dd.cf.54.92.c9.60.00.00.ca.03.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_VOLATILE
  Lifespan: 9223372036854775807 nanoseconds
  Deadline: 9223372036854775807 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 9223372036854775807 nanoseconds

Subscription count: 1

Node name: cp_sdsm_to_detection_list_node
Node namespace: /environment
Topic type: carma_v2x_msgs/msg/SensorDataSharingMessage
Endpoint type: SUBSCRIPTION
GID: b1.24.10.01.64.ab.c5.0a.0e.8d.3b.95.00.00.77.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_VOLATILE
  Lifespan: 9223372036854775807 nanoseconds
  Deadline: 9223372036854775807 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 9223372036854775807 nanoseconds

@MishkaMN
Copy link
Contributor Author

carma@ubuntu:/$ ros2 topic info /environment/fused_external_objects --verbose
Type: carma_perception_msgs/msg/ExternalObjectList

Publisher count: 1

Node name: cp_track_list_to_external_object_list_node
Node namespace: /environment
Topic type: carma_perception_msgs/msg/ExternalObjectList
Endpoint type: PUBLISHER
GID: b1.24.10.01.64.ab.c5.0a.0e.8d.3b.95.00.00.bb.03.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_VOLATILE
  Lifespan: 9223372036854775807 nanoseconds
  Deadline: 9223372036854775807 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 9223372036854775807 nanoseconds

Subscription count: 1

Node name: motion_computation_node
Node namespace: /environment
Topic type: carma_perception_msgs/msg/ExternalObjectList
Endpoint type: SUBSCRIPTION
GID: 66.06.10.01.3f.75.09.ad.b2.1a.52.94.00.00.da.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_VOLATILE
  Lifespan: 9223372036854775807 nanoseconds
  Deadline: 9223372036854775807 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 9223372036854775807 nanoseconds

Comment on lines 93 to 94
carma_cooperative_perception_param_file = os.path.join(
get_package_share_directory('carma_cooperative_perception'), 'config/params.yaml')
Copy link
Contributor

Choose a reason for hiding this comment

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

The recommended way to do paths now is with pathlib. This should be refactored to something like this:

carma_cooperative_perception_param_file = str(get_package_share_directory("carma_cooperative_perception") / "config/params.yaml")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

imported pathlib to handle this

carma/launch/environment.launch.py Outdated Show resolved Hide resolved
@MishkaMN MishkaMN merged commit a2a63cf into develop Nov 21, 2023
2 of 3 checks passed
@MishkaMN MishkaMN deleted the feature/launch_cp_nodes branch November 21, 2023 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[cooperative_perception] Add carma_cooperative_perception nodes to CARMA launch configuration
2 participants