Skip to content

Commit 4c450a8

Browse files
authored
Merge pull request #136 from AutoModality/AM-677/culvert_alt
fix: added log of currentENU
2 parents e321900 + 3edd23e commit 4c450a8

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/am_super/am_super.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include <ros/ros.h>
55
#include <diagnostic_msgs/DiagnosticArray.h>
6+
#include <nav_msgs/Odometry.h>
67
#include <sensor_msgs/Joy.h>
78
#include <sensor_msgs/PointCloud2.h>
89
#include <std_msgs/Int16.h>
@@ -69,6 +70,7 @@ class AMSuper : AMLifeCycle
6970
ros::Subscriber operator_command_sub_;
7071
ros::Subscriber controller_state_sub;
7172
ros::Subscriber diagnostics_sub;
73+
ros::Subscriber current_enu_sub;
7274
ros::Timer heartbeat_timer_;
7375

7476
ros::Subscriber log_control_sub_;
@@ -223,6 +225,8 @@ class AMSuper : AMLifeCycle
223225

224226
diagnostics_sub = nh_.subscribe("/diagnostics", 100, &AMSuper::diagnosticsCB, this);
225227

228+
current_enu_sub = nh_.subscribe(am_topics::CTRL_VX_VEHICLE_CURRENTENU, 100, &AMSuper::currentENUCB, this);
229+
226230
heartbeat_timer_ = nh_.createTimer(ros::Duration(1.0), &AMSuper::heartbeatCB, this);
227231
}
228232

@@ -788,6 +792,11 @@ class AMSuper : AMLifeCycle
788792
LOG_MSG("/diagnostics", msg, SU_LOG_LEVEL);
789793
}
790794

795+
void currentENUCB(const nav_msgs::Odometry::ConstPtr &msg)
796+
{
797+
LOG_MSG(am_topics::CTRL_VX_VEHICLE_CURRENTENU, msg, SU_LOG_LEVEL);
798+
}
799+
791800
BagLogger::BagLoggerLevel intToLoggerLevel(int level)
792801
{
793802
switch (level)

0 commit comments

Comments
 (0)