Align robot position in stage and rviz after soft reset
I am doing a Benchmark in Stage to test the performance of the local planner. So i wrote a script to make the robot to move infinite to one point and back. And i want to reset the robot position to original as soon as the robot get collided. I called the "reset robot position" service published by stage_ros, the code like following:
ros::ServiceClient client = nh1.serviceClient<std_srvs::empty>("reset_positions");
std_srvs::Empty reset_srv;
client.call(reset_srv);
After the robot was reset, the robot seemed to be "lost", the robot position in stage and rviz were not aligned, and the robot couldn't be navigated nomally. Can someone tell me why?