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

[cooperative perception] Move motion model mapping default values to MotionModelMapping class #2203

Merged
merged 3 commits into from
Dec 4, 2023

Conversation

adamlm
Copy link
Contributor

@adamlm adamlm commented Nov 30, 2023

PR Details

Description

The default motion model mapping values were specified in the ROS parameter declarations, but this meant the MotionModelMapper instance never got them. Its values wouldn't be updated unless a user changed them. Now, the default values are stored in the class instance, and the ROS parameter declarations get their default values from the instance.

Related GitHub Issue

Closes #2202

Related Jira Key

Closes CDAR-531

Motivation and Context

See above

How Has This Been Tested?

Types of changes

  • Defect fix (non-breaking change that fixes an issue)

Checklist:

  • I have added any new packages to the sonar-scanner.properties file
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

The default motion model mapping values were specified in the ROS
parameter declarations, but this meant the MotionModelMapper instance
never got them. Its values wouldn't be updated unless a user changed
them. Now, the default values are stored in the class instance, and the
ROS parameter declarations get their default values from the instance.
@adamlm adamlm requested a review from MishkaMN November 30, 2023 23:02
The parameter declarations for the ExternalObjectListToDetectionListNode
got moved to after the on_set_parameter_callback assignment because
the callback was previously not being called when the parameters were
initially declared. This prevented the motion_model_mapping_ from
being updated with the user-overridden mappings.
@adamlm adamlm marked this pull request as ready for review December 1, 2023 15:22
Copy link
Contributor

@MishkaMN MishkaMN left a comment

Choose a reason for hiding this comment

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

Discussed during the VRU meeting to change the default values from CV to CTRV because they are not currently supported

@@ -112,7 +112,7 @@ auto make_detection(const carma_cooperative_perception_interfaces::msg::Detectio
return make_ctra_detection(msg);

case msg.MOTION_MODEL_CV:
break;
throw std::runtime_error("unsupported motion model type '3: constant velocity (CV)'");
Copy link
Contributor

Choose a reason for hiding this comment

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

actually why is this unsupported again?

Copy link
Contributor

Choose a reason for hiding this comment

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

pedestrian seems to be using CV model
std::uint8_t pedestrian_model{carma_cooperative_perception_interfaces::msg::Detection::MOTION_MODEL_CV};

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is the default, but in practice we will probably change it through parameters in the launch configuration. I will change the default to be CTRV since that is supported.

We don't support CV models because the multiple_object_tracking library does not have them. We can add it in, but that would be a different issue.

The previous motion model mapping used CV model for pedestrians and
and unknowns, but the CV model is unsupported. This changes the default
to CTRV so we don't default to unsupported motion models.
@adamlm adamlm requested a review from MishkaMN December 4, 2023 15:44
@MishkaMN MishkaMN merged commit 8ccdd28 into develop Dec 4, 2023
2 of 3 checks passed
@adamlm adamlm deleted the 2202-motion-model-mapping branch December 4, 2023 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[cooperative perception] External object list to detection list node does not use default motion model mapping
2 participants