|
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>
|
@@ -70,6 +71,7 @@ class AMSuper : AMLifeCycle
|
70 | 71 | ros::Subscriber operator_command_sub_;
|
71 | 72 | ros::Subscriber controller_state_sub;
|
72 | 73 | ros::Subscriber diagnostics_sub;
|
| 74 | + ros::Subscriber current_enu_sub; |
73 | 75 | ros::Timer heartbeat_timer_;
|
74 | 76 |
|
75 | 77 | ros::Subscriber log_control_sub_;
|
@@ -228,6 +230,8 @@ class AMSuper : AMLifeCycle
|
228 | 230 |
|
229 | 231 | diagnostics_sub = nh_.subscribe("/diagnostics", 100, &AMSuper::diagnosticsCB, this);
|
230 | 232 |
|
| 233 | + current_enu_sub = nh_.subscribe(am_topics::CTRL_VX_VEHICLE_CURRENTENU, 100, &AMSuper::currentENUCB, this); |
| 234 | + |
231 | 235 | heartbeat_timer_ = nh_.createTimer(ros::Duration(1.0), &AMSuper::heartbeatCB, this);
|
232 | 236 | }
|
233 | 237 |
|
@@ -748,6 +752,11 @@ class AMSuper : AMLifeCycle
|
748 | 752 | LOG_MSG("/diagnostics", msg, SU_LOG_LEVEL);
|
749 | 753 | }
|
750 | 754 |
|
| 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 | + |
751 | 760 | BagLogger::BagLoggerLevel intToLoggerLevel(int level)
|
752 | 761 | {
|
753 | 762 | switch (level)
|
|
0 commit comments