Fast-tracker
Fast-tracker copied to clipboard
How to get the target when in real experiment?
In the simulation, I find the target is get by the car_state, the Odometry of the car is easy to know, so in the code is very simple:
void Sim_detect::car_state_cb(const nav_msgs::Odometry& car_state){
if(!has_map) return;
Eigen::Vector3d car_pos;
car_pos<<car_state.pose.pose.position.x,car_state.pose.pose.position.y,car_state.pose.pose.position.z;
// if((car_pos-drone_pos).norm()>3.0) return;
if(!is_block(car_pos,drone_pos)){
nav_msgs::Odometry state_pub = car_state;
state_pub.header.stamp = ros::Time::now();
detection_pub.publish(state_pub);
}
}
But how to detect in the real world, because the odometry the target_people is not know?