|
@@ -22,6 +22,8 @@
|
|
#include "lgsvl_msgs/VehicleControlData.h"
|
|
#include "lgsvl_msgs/VehicleControlData.h"
|
|
#include "lgsvl_msgs/VehicleStateData.h"
|
|
#include "lgsvl_msgs/VehicleStateData.h"
|
|
|
|
|
|
|
|
+#include <geometry_msgs/TwistStamped.h>
|
|
|
|
+
|
|
#include "rawpic.pb.h"
|
|
#include "rawpic.pb.h"
|
|
#include "odom.pb.h"
|
|
#include "odom.pb.h"
|
|
#include "decition.pb.h"
|
|
#include "decition.pb.h"
|
|
@@ -35,10 +37,13 @@ static std::string _image_msgname = "pic_ros";
|
|
static std::string _odom_topic = "/odom";
|
|
static std::string _odom_topic = "/odom";
|
|
static std::string _odom_msgname = "odom_ros";
|
|
static std::string _odom_msgname = "odom_ros";
|
|
|
|
|
|
|
|
+static std::string _twistraw_topic = "/twist_raw";
|
|
|
|
|
|
ros::Subscriber points_sub;
|
|
ros::Subscriber points_sub;
|
|
ros::Subscriber odom_sub;
|
|
ros::Subscriber odom_sub;
|
|
|
|
|
|
|
|
+ ros::Subscriber twist_sub;
|
|
|
|
+
|
|
void * gpa_lidar;
|
|
void * gpa_lidar;
|
|
void * gpa_image;
|
|
void * gpa_image;
|
|
void * gpa_odom;
|
|
void * gpa_odom;
|
|
@@ -203,6 +208,12 @@ void testvh()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void twistrawCalllback(const geometry_msgs::TwistStampedConstPtr & msg)
|
|
|
|
+{
|
|
|
|
+ autoware_msgs::VehicleCmd xcmd;
|
|
|
|
+ xcmd.twist_cmd.twist = msg->twist;
|
|
|
|
+ test_cmd_pub.publish(xcmd);
|
|
|
|
+}
|
|
void UpdateDecition(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname)
|
|
void UpdateDecition(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname)
|
|
{
|
|
{
|
|
|
|
|
|
@@ -290,6 +301,9 @@ int main(int argc, char *argv[])
|
|
std::cout<<"_odom_topic is "<<_odom_topic<<std::endl;
|
|
std::cout<<"_odom_topic is "<<_odom_topic<<std::endl;
|
|
std::cout<<"_odom_msgname : "<<_odom_msgname<<std::endl;
|
|
std::cout<<"_odom_msgname : "<<_odom_msgname<<std::endl;
|
|
|
|
|
|
|
|
+ private_nh.getParam("autoware_twist_raw",_twistraw_topic);
|
|
|
|
+ std::cout<<" _twist_topic : "<<_twistraw_topic<<std::endl;
|
|
|
|
+
|
|
test_cmd_pub = private_nh.advertise<autoware_msgs::VehicleCmd>(
|
|
test_cmd_pub = private_nh.advertise<autoware_msgs::VehicleCmd>(
|
|
"/vehicle_cmd", 10);
|
|
"/vehicle_cmd", 10);
|
|
lgsvl_state_pub = private_nh.advertise<lgsvl_msgs::VehicleStateData>("/vehicle_state",10);
|
|
lgsvl_state_pub = private_nh.advertise<lgsvl_msgs::VehicleStateData>("/vehicle_state",10);
|
|
@@ -306,6 +320,8 @@ int main(int argc, char *argv[])
|
|
|
|
|
|
odom_sub = private_nh.subscribe(_odom_topic,1,odomCalllback);
|
|
odom_sub = private_nh.subscribe(_odom_topic,1,odomCalllback);
|
|
|
|
|
|
|
|
+twist_sub = private_nh.subscribe(_twistraw_topic,1,twistrawCalllback);
|
|
|
|
+
|
|
void * pdecition = iv::modulecomm::RegisterRecv("deciton",UpdateDecition);
|
|
void * pdecition = iv::modulecomm::RegisterRecv("deciton",UpdateDecition);
|
|
// std::thread * pnew = new std::thread(testvh);
|
|
// std::thread * pnew = new std::thread(testvh);
|
|
|
|
|