Skip to content

Commit

Permalink
Add conditional compilation to TFMessageMsgSerializer for ROS2
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob-Eric committed Nov 20, 2024
1 parent a2b6711 commit 58c7e1d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ public override TFMessageMsg Serialize()
TransformStampedMsg transform = new TransformStampedMsg();
transform.header = new HeaderMsg();
transform.header.stamp = headerMsg.stamp;
#if ROS2
#else
transform.header.seq = headerMsg.seq;
#endif
transform.header.frame_id = data.frame_id_parent;
transform.child_frame_id = data.frame_id_child;
transform.transform.translation = data.position.To<FLU>();
Expand Down

0 comments on commit 58c7e1d

Please sign in to comment.