Skip to content

Commit d3c7067

Browse files
committed
fix: added log of currentENU
1 parent 7b89d7b commit d3c7067

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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>
@@ -70,6 +71,7 @@ class AMSuper : AMLifeCycle
7071
ros::Subscriber operator_command_sub_;
7172
ros::Subscriber controller_state_sub;
7273
ros::Subscriber diagnostics_sub;
74+
ros::Subscriber current_enu_sub;
7375
ros::Timer heartbeat_timer_;
7476

7577
ros::Subscriber log_control_sub_;
@@ -228,6 +230,8 @@ class AMSuper : AMLifeCycle
228230

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

233+
current_enu_sub = nh_.subscribe(am_topics::CTRL_VX_VEHICLE_CURRENTENU, 100, &AMSuper::currentENUCB, this);
234+
231235
heartbeat_timer_ = nh_.createTimer(ros::Duration(1.0), &AMSuper::heartbeatCB, this);
232236
}
233237

@@ -748,6 +752,11 @@ class AMSuper : AMLifeCycle
748752
LOG_MSG("/diagnostics", msg, SU_LOG_LEVEL);
749753
}
750754

755+
void currentENUCB(const nav_msgs::Odometry::ConstPtr &msg)
756+
{
757+
LOG_MSG(am_topics::CTRL_VX_VEHICLE_CURRENTENU, msg, SU_LOG_LEVEL);
758+
}
759+
751760
BagLogger::BagLoggerLevel intToLoggerLevel(int level)
752761
{
753762
switch (level)

0 commit comments

Comments
 (0)