| 118 | } |
| 119 | |
| 120 | void pathHandler(const nav_msgs::Path::ConstPtr& pathIn) |
| 121 | { |
| 122 | int pathSize = pathIn->poses.size(); |
| 123 | path.poses.resize(pathSize); |
| 124 | for (int i = 0; i < pathSize; i++) { |
| 125 | path.poses[i].pose.position.x = pathIn->poses[i].pose.position.x; |
| 126 | path.poses[i].pose.position.y = pathIn->poses[i].pose.position.y; |
| 127 | path.poses[i].pose.position.z = pathIn->poses[i].pose.position.z; |
| 128 | } |
| 129 | |
| 130 | vehicleXRec = vehicleX; |
| 131 | vehicleYRec = vehicleY; |
| 132 | vehicleZRec = vehicleZ; |
| 133 | vehicleRollRec = vehicleRoll; |
| 134 | vehiclePitchRec = vehiclePitch; |
| 135 | vehicleYawRec = vehicleYaw; |
| 136 | |
| 137 | pathPointID = 0; |
| 138 | pathInit = true; |
| 139 | } |
| 140 | |
| 141 | void joystickHandler(const sensor_msgs::Joy::ConstPtr& joy) |
| 142 | { |