LibCarla prepration for extended ROS2 support#1
Open
berndgassmann wants to merge 4 commits intoberndgassmann/rework_ros2_step_1_harmonize_buildfrom
Open
Conversation
Actor:
Moved Blueprint handling sources to carla/actor from carla/client to
be able to make use of that functionalilty within server when ROS2
is activated.
DataTypes:
Introduced geom::AngularVelocity, geom::Velocity,geom::Acceleration,
geom::Quaternion to make the Unreal -> Carla -> ROS2 data conversion
straigth forward
Added some Math functions for Quaternions
Renamed MakeSafeUnitVector->MakeUnitVector (there is no 'unsafe'
variant allowed anymore)
Streaming:
Moved streaming/detail/tcp/Message.h -> streaming/detail/Message.h
to be deployed for non-tcp communication streams like ROS2.
Moved general (tcp-independent parts) from tcp/ServerSession to
streaming/detail/Session.h to be used for ROS2 streams. Had to
rename a Write() function to WriteMessage because of virtual
function overloaded with template function not possible.
Make Dispatcher a shared_pointer to be able to access from ROS2.
Serializer:
Provide GetHeaderOffset() functions where missing.
Add sensor_relative_transform (Location and Quaternion parts) to
SensorHeader to support relative TF. Keep it in the header also
when not compiled with ROS2 to keep ROS enabled server builds
compatible with non-ROS enabled client builds as it's not that
much of an overhead.
Allow to replace move semantic from Deserialize on ROS2-server builds
to allow multiple sinks (i.e. TCP-Server and ROS2 to deserialize the
data without destoying it).
Added VehicleAckermannControl to ActorDynamicState in form of a
union with VehicleControl to save space
Extract sensor/data/Array.h into a ArrayConst.h base class to be
used for const data acess on ROS2 Deserialization of
RawEpisodeState.
UE4:
Updated according to LibCarla changes.
BoundingBoxCalulator: added GetSkeletalMeshVerticies to allow upcoming
ROS2 access to detailed mesh as exact ground truth
Vehicle/Walker Control were extended by timestamp of the last control
input to have a notion on how old the last queried control value was
V2XSensor: Allow selection of virtual communication channels via
sensors 'role_name' attribute.
BUGFIX:
Fixed geom::Rotation::RotateVector() rotation directions of
pitch and roll!
Added RightHandedVector3D.h (internal class deployed
for correct rotation of CARLA left handed vectors)
Allow to comment TransformationMatrix access out by ifdef to prevent
from erroneous misuse (default access is still enabled!)
Minor:
Handled some compiler warnings
651d4fb to
26e153d
Compare
added 3 commits
August 29, 2024 12:53
…_harmonize_build' into HEAD
- A side effect of the previous Math rotation fixes was autopilot steering angle calculation. Replaced by generic Math computations with clear explanation how the angle is calculated - added Math::GetVectorAngle(), Math::GetVectorAngleAbs() and supporting functions - use angle functions within MotionPlanStage to get correct angle delta
…berndgassmann/rework_ros2_step_2_prepare_libcarla
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Actor:
Moved Blueprint handling sources to carla/actor from carla/client to
be able to make use of that functionalilty within server when ROS2
is activated.
DataTypes:
Introduced geom::AngularVelocity, geom::Velocity,geom::Acceleration,
geom::Quaternion to make the Unreal -> Carla -> ROS2 data conversion
straigth forward
Added some Math functions for Quaternions
Renamed MakeSafeUnitVector->MakeUnitVector (there is no 'unsafe'
variant allowed anymore)
Streaming:
Moved streaming/detail/tcp/Message.h -> streaming/detail/Message.h
to be deployed for non-tcp communication streams like ROS2.
Moved general (tcp-independent parts) from tcp/ServerSession to
streaming/detail/Session.h to be used for ROS2 streams. Had to
rename a Write() function to WriteMessage because of virtual
function overloaded with template function not possible.
Make Dispatcher a shared_pointer to be able to access from ROS2.
Serializer:
Provide GetHeaderOffset() functions where missing.
Add sensor_relative_transform (Location and Quaternion parts) to
SensorHeader to support relative TF. Keep it in the header also
when not compiled with ROS2 to keep ROS enabled server builds
compatible with non-ROS enabled client builds as it's not that
much of an overhead.
Allow to replace move semantic from Deserialize on ROS2-server builds
to allow multiple sinks (i.e. TCP-Server and ROS2 to deserialize the
data without destoying it).
Added VehicleAckermannControl to ActorDynamicState in form of a
union with VehicleControl to save space
Extract sensor/data/Array.h into a ArrayConst.h base class to be
used for const data acess on ROS2 Deserialization of
RawEpisodeState.
UE4:
Updated according to LibCarla changes.
BoundingBoxCalulator: added GetSkeletalMeshVerticies to allow upcoming
ROS2 access to detailed mesh as exact ground truth
Vehicle/Walker Control were extended by timestamp of the last control
input to have a notion on how old the last queried control value was
V2XSensor: Allow selection of virtual communication channels via
sensors 'role_name' attribute.
BUGFIX:
Fixed geom::Rotation::RotateVector() rotation directions of
pitch and roll!
Added RightHandedVector3D.h (internal class deployed
for correct rotation of CARLA left handed vectors)
Allow to comment TransformationMatrix access out by ifdef to prevent
from erroneous misuse (default access is still enabled!)
Minor:
Handled some compiler warnings
Fixes #
Fixes geom::Rotation::RotateVector() rotation directions of pitch and roll!
Where has this been tested?
Platform(s): ... Ubuntu 22.04, 20.04
Python version(s): ... 3.10
Unreal Engine version(s): ...4.26
tested build of:
launched carla from installed package and verified basic ros2 is working:
Possible Drawbacks
Since there is no unsafe MakeUnitVector anymore, possible undetected issues in some code using the unsafe variant of MakeUnitVector() might pop up