determine goal position with plant flag

asked 2018-06-30 16:19:05 -0600

arya gravatar image

hello dears,

i would like to do implement p-controller for turtebot such this: - first run the rviz and use plant flag > publish point which is in /point_clicked topic - above theorem release a position where you click on the screen in rviz - my problem : i am going to use this point as a goal position but i can not , i will bring the code in below - at the end with nav_message::Odometry i expect to see the current position as well as i can not.

i am new person in ros please help me to handle this code. really thank you so much.

Publisher velocity_publisher; Publisher Goal_;

int main(int argc, char **argv) {

init(argc, argv , "location");
NodeHandle n;
NodeHandle g;

velocity_publisher = n.advertise<geometry_msgs::Twist>("/cmd_vel",10);
Goal_ = g.advertise<geometry_msgs::PointStamped>("/clicked_point",10);


void move() { geometry_msgs::Twist vel_meg; geometry_msgs::PointStamped goal; nav_msgs::Odometry pose;

double pose_x = pose.pose.pose.position.x ;
double pose_y = pose.pose.pose.position.y ;

// now i just need to acess to the datum of the location if happen i think that all things will happen;)
    cout << pose_y<<endl;


edit retag flag offensive close merge delete