|
3 | 3 |
|
4 | 4 | #include <ros/ros.h> |
5 | 5 | #include <diagnostic_msgs/DiagnosticArray.h> |
| 6 | +#include <nav_msgs/Odometry.h> |
6 | 7 | #include <sensor_msgs/Joy.h> |
7 | 8 | #include <sensor_msgs/PointCloud2.h> |
8 | 9 | #include <std_msgs/Int16.h> |
@@ -69,6 +70,7 @@ class AMSuper : AMLifeCycle |
69 | 70 | ros::Subscriber operator_command_sub_; |
70 | 71 | ros::Subscriber controller_state_sub; |
71 | 72 | ros::Subscriber diagnostics_sub; |
| 73 | + ros::Subscriber current_enu_sub; |
72 | 74 | ros::Timer heartbeat_timer_; |
73 | 75 |
|
74 | 76 | ros::Subscriber log_control_sub_; |
@@ -223,6 +225,8 @@ class AMSuper : AMLifeCycle |
223 | 225 |
|
224 | 226 | diagnostics_sub = nh_.subscribe("/diagnostics", 100, &AMSuper::diagnosticsCB, this); |
225 | 227 |
|
| 228 | + current_enu_sub = nh_.subscribe(am_topics::CTRL_VX_VEHICLE_CURRENTENU, 100, &AMSuper::currentENUCB, this); |
| 229 | + |
226 | 230 | heartbeat_timer_ = nh_.createTimer(ros::Duration(1.0), &AMSuper::heartbeatCB, this); |
227 | 231 | } |
228 | 232 |
|
@@ -788,6 +792,11 @@ class AMSuper : AMLifeCycle |
788 | 792 | LOG_MSG("/diagnostics", msg, SU_LOG_LEVEL); |
789 | 793 | } |
790 | 794 |
|
| 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 | + |
791 | 800 | BagLogger::BagLoggerLevel intToLoggerLevel(int level) |
792 | 801 | { |
793 | 802 | switch (level) |
|
0 commit comments