Skip to content

Commit

Permalink
update ros2 wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
admercs committed Mar 7, 2024
1 parent a737813 commit afd86d6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ros2/src/autonomysim_ros_pkgs/src/autonomysim_ros_wrapper.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// autonomysim_ros_wrapper.cpp

#include "common/AutonomySimSettings.hpp"
#include <autonomysim_ros_wrapper.h>
#include <tf2_sensor_msgs/tf2_sensor_msgs.h>
#include "autonomysim_ros_wrapper.h"
#include "common/AutonomySimSettings.hpp" // AutonomyLib
#include "tf2_sensor_msgs/tf2_sensor_msgs.h"

using namespace std::placeholders;

Expand Down Expand Up @@ -758,8 +758,9 @@ AutonomySimROSWrapper::get_lidar_msg_from_autonomysim(const nervosys::autonomyli
if (isENU_) {
try {
sensor_msgs::msg::PointCloud2 lidar_msg_enu;
auto transformStampedENU = tf_buffer_->lookupTransform(
AUTONOMYSIM_FRAME_ID, vehicle_name, rclcpp::Time(0), rclcpp::Duration::from_nanoseconds(1));
auto transformStampedENU =
tf_buffer_->lookupTransform(AUTONOMYSIM_FRAME_ID, vehicle_name, rclcpp::Time(0),
rclcpp::Duration::to_chrono<std::chrono::nanoseconds>(1));
tf2::doTransform(lidar_msg, lidar_msg_enu, transformStampedENU);

lidar_msg_enu.header.stamp = lidar_msg.header.stamp;
Expand Down

0 comments on commit afd86d6

Please sign in to comment.