Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get the target when in real experiment? #9

Open
XXLiu-HNU opened this issue Nov 1, 2024 · 0 comments
Open

How to get the target when in real experiment? #9

XXLiu-HNU opened this issue Nov 1, 2024 · 0 comments

Comments

@XXLiu-HNU
Copy link

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);
    }

}

5235991492


But how to detect in the real world, because the odometry the target_people is not know?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant