-
Notifications
You must be signed in to change notification settings - Fork 60
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
Refactor ROS 2 sensor components events management #482
Refactor ROS 2 sensor components events management #482
Conversation
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
…cessary includes. Update documentation. Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
…ntSourceAdapter documentation. Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
…edSource. Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
…rce. Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
80bc1ce
to
ecc761b
Compare
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
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.
Nice work!
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
…pter. Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
… adjustment for PhysicsBasedSource. Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
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.
Good work!
…pdated. Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
# Conflicts: # Gems/ROS2/Code/Source/Lidar/ROS2Lidar2DSensorComponent.cpp # Gems/ROS2/Code/Source/Lidar/ROS2LidarSensorComponent.cpp # Gems/ROS2/Code/Source/ROS2SystemComponent.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.
Please make sure that the contribution compiles with non-unity build.
auto* sceneInterface = AZ::Interface<AzPhysics::SceneInterface>::Get(); | ||
const auto gravity = sceneInterface->GetGravity(sceneHandle); | ||
auto* body = sceneInterface->GetSimulatedBodyFromHandle(sceneHandle, m_bodyHandle); |
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.
I would suggest multiple assertions here - the code can mistakenly be executed in a different context by mistake (e.g. in Asset Processor) and a good assertion can be helpful.
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.
I belive gravity is not needed.
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.
I added an assert on body pointer - this is a good catch. I left sceneInterface as it is - do you maybe think that it is necessary to assert it, when it is a result from:
AZ::InterfaceAzPhysics::SceneInterface::Get()
engine call? Here I assume, that it won't rather fail, and if it will, then we have some critical issue. Is such reasoning not correct?
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Universal event management system for sensor components in ROS 2. --------- Signed-off-by: Paweł Liberadzki <44069826+PawelLiberadzki@users.noreply.github.com >
Universal event management system for sensor components in ROS 2. --------- Signed-off-by: Paweł Liberadzki <44069826+PawelLiberadzki@users.noreply.github.com > Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
Universal event management system for sensor components in ROS 2. --------- Signed-off-by: Paweł Liberadzki <44069826+PawelLiberadzki@users.noreply.github.com > Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
Universal event management system for sensor components in ROS 2. --------- Signed-off-by: Paweł Liberadzki <44069826+PawelLiberadzki@users.noreply.github.com > Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
This is a proposition of universal sensor events management, that solves issue #295.
I introduce event source interface, and two sample implementations of it - TickBasedSource and PhysicsBasedSource. They are used through event source adapter in a new sensor component base class ROS2SensorComponentBase (previously ROS2SensorComponent).