|
@@ -16,6 +16,8 @@
|
|
#include<image_transport/image_transport.h>
|
|
#include<image_transport/image_transport.h>
|
|
|
|
|
|
#include <nav_msgs/Odometry.h>
|
|
#include <nav_msgs/Odometry.h>
|
|
|
|
+#include <geometry_msgs/PointStamped.h>
|
|
|
|
+#include <geometry_msgs/TwistStamped.h>
|
|
|
|
|
|
#include "autoware_msgs/Lane.h"
|
|
#include "autoware_msgs/Lane.h"
|
|
|
|
|
|
@@ -160,8 +162,10 @@ void Listenodom(const char * strdata,const unsigned int nSize,const unsigned int
|
|
msg.twist.twist.angular.z = xodom.twist_angula().z();
|
|
msg.twist.twist.angular.z = xodom.twist_angula().z();
|
|
|
|
|
|
|
|
|
|
- geometry_msgs::Pose xPose = msg.pose.pose;
|
|
|
|
- geometry_msgs::Twist xtwist = msg.twist.twist;
|
|
|
|
|
|
+ geometry_msgs::PoseStamped xPose;
|
|
|
|
+ xPose.pose = msg.pose.pose;
|
|
|
|
+ geometry_msgs::TwistStamped xtwist;
|
|
|
|
+ xtwist.twist = msg.twist.twist;
|
|
|
|
|
|
pose_pub.publish(xPose);
|
|
pose_pub.publish(xPose);
|
|
twist_pub.publish(xtwist);
|
|
twist_pub.publish(xtwist);
|
|
@@ -256,6 +260,8 @@ void ListenWayPointsMap(const char * strdata,const unsigned int nSize,const unsi
|
|
xpoint.pose.pose.orientation.y = quat.y;
|
|
xpoint.pose.pose.orientation.y = quat.y;
|
|
xpoint.pose.pose.orientation.z = quat.z;
|
|
xpoint.pose.pose.orientation.z = quat.z;
|
|
xpoint.pose.pose.orientation.w = quat.w;
|
|
xpoint.pose.pose.orientation.w = quat.w;
|
|
|
|
+
|
|
|
|
+ xpoint.twist.twist.linear.x = ppoint->speed();
|
|
xlane.waypoints.push_back(xpoint);
|
|
xlane.waypoints.push_back(xpoint);
|
|
|
|
|
|
|
|
|
|
@@ -321,8 +327,8 @@ int main(int argc, char *argv[])
|
|
_point_topic, 10);
|
|
_point_topic, 10);
|
|
|
|
|
|
waypoints_pub = private_nh.advertise<autoware_msgs::Lane>(_waypoints_topic,10);
|
|
waypoints_pub = private_nh.advertise<autoware_msgs::Lane>(_waypoints_topic,10);
|
|
- pose_pub = private_nh.advertise<geometry_msgs::Pose>(_pose_topic,10);
|
|
|
|
- twist_pub = private_nh.advertise<geometry_msgs::Twist>(_twist_topic,10);
|
|
|
|
|
|
+ pose_pub = private_nh.advertise<geometry_msgs::PoseStamped>(_pose_topic,10);
|
|
|
|
+ twist_pub = private_nh.advertise<geometry_msgs::TwistStamped>(_twist_topic,10);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -336,6 +342,8 @@ int main(int argc, char *argv[])
|
|
void * pliar = iv::modulecomm::RegisterRecv(_point_msgname.data(),ListenPointCloud);
|
|
void * pliar = iv::modulecomm::RegisterRecv(_point_msgname.data(),ListenPointCloud);
|
|
void * podom = iv::modulecomm::RegisterRecv(_odom_msgname.data(),Listenodom);
|
|
void * podom = iv::modulecomm::RegisterRecv(_odom_msgname.data(),Listenodom);
|
|
|
|
|
|
|
|
+ void * pway = iv::modulecomm::RegisterRecv(_waypoints_msgname.data(),ListenWayPointsMap);
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
ros::spin();
|
|
ros::spin();
|