Robotics StackExchange | Archived questions

determine goal position with plant flag

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 /pointclicked 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 navmessage::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 velocitypublisher; 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);
move();
spin();

}

void move() { geometrymsgs::Twist velmeg; geometrymsgs::PointStamped goal; navmsgs::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;

}

Asked by arya on 2018-06-30 16:19:05 UTC

Comments

Answers