Skip to content

Commit 1720b85

Browse files
committed
Moved and extended metrics added reinit in the waypoint to target node
1 parent 98c90a0 commit 1720b85

File tree

3 files changed

+118
-89
lines changed

3 files changed

+118
-89
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,14 @@ Reads the waypoint array and speeds, from that it creates single or mutliple goa
5555

5656
It also provides a `/metrics_wayp` array topic with the following elements:
5757

58-
| Array element | Meaning
59-
| :--- | :---
60-
|`[0]` | current lateral distance to the waypoint (cross-track error)
61-
|`[1]` | average lateral distance over time
62-
|`[2]` | current waypoint ID
63-
|`[3]` | target waypoint ID
64-
|`[4]` | target waypoint longitudinal distance
58+
| Array element | Meaning | Const
59+
| :--- | :--- | :---
60+
|`[0]` | current lateral distance to the waypoint (signed, cross-track error) | `CUR_LAT_DIST_SIGNED`
61+
|`[1]` | current lateral distance to the waypoint (absolute value) | `CUR_LAT_DIST_ABS`
62+
|`[2]` | average lateral distance over time | `AVG_LAT_DISTANCE`
63+
|`[3]` | current waypoint ID | `CUR_WAYPOINT_ID`
64+
|`[4]` | target waypoint ID | `TRG_WAYPOINT_ID`
65+
|`[5]` | target waypoint longitudinal distance | `TRG_WAY_LON_DIST`
6566

6667
<img src="csv/lookahead01.svg" width=60% />
6768

include/wayp_plan_tools/common.hpp

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
#ifndef COMMON_HPP_
22
#define COMMON_HPP_
33

4-
//#include <iostream>
5-
//#include "rclcpp/rclcpp.hpp"
6-
//#include "geometry_msgs/msg/pose.hpp"
7-
//#include "geometry_msgs/msg/pose_stamped.hpp"
8-
//#include "geometry_msgs/msg/pose_array.hpp"
4+
// #include <iostream>
5+
// #include "rclcpp/rclcpp.hpp"
6+
// #include "geometry_msgs/msg/pose.hpp"
7+
// #include "geometry_msgs/msg/pose_stamped.hpp"
8+
// #include "geometry_msgs/msg/pose_array.hpp"
99

1010
namespace common_wpt
1111
{
12-
12+
enum METRICS
13+
{
14+
CUR_LAT_DIST_SIGNED = 0, // current lateral distance to the waypoint (signed, cross-track error)
15+
CUR_LAT_DIST_ABS, // current lateral distance to the waypoint (absolute value)
16+
AVG_LAT_DISTANCE, // average lateral distance over time
17+
CUR_WAYPOINT_ID, // current waypoint ID
18+
TRG_WAYPOINT_ID, // target waypoint ID
19+
TRG_WAY_LON_DIST, // target waypoint longitudinal distance
20+
NOT_USED_YET
21+
};
1322
} // namespace common_wpt
1423

15-
#endif // COMMON_HPP_
24+
#endif // COMMON_HPP_

0 commit comments

Comments
 (0)