-
Notifications
You must be signed in to change notification settings - Fork 122
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
Provide ability to programmatically change the pose of a robot. #39
base: lunar-devel
Are you sure you want to change the base?
Conversation
Thanks for the contribution! We'll review it and get back to your asap. /cc @gerkey fyi |
This is very similar to the discussion we started here: |
…osition on cmd_pose, and it will move there. Patch courtesy of ros-simulation/stage_ros#39
Sorry, I accidentally closed this when changing the branch layout of the repository. I've reopened it and updated the target base to be |
Is this pull request going to be merged? This patch is very helpful. |
I just rebased to remove some unnecessary comments from the commit history. Should I squash everything down into one commit. Sorry, I've never actually done this before! |
I would like to be able to programmatically change the pose of one or multiple robots within stage. I don't want to have to alter the worldfile or drag around the robot in stage with my mouse to do this.
Thus, I added a subscriber to a
geometry_msgs\Pose2D
message on the topiccmd_pose
or\robot_#\cmd_pose
. A callback functioncmdposeRecieved()
is modeled aftercmdvelRecieved()
and callsSetPose()
to set the robot's pose in the stage simulator.My code is adapted from and answer to the question found here:
http://answers.ros.org/question/61503/stageros-how-to-programmatically-set-the-pose-of-a-simulated-robot/?answer=61612#post-id-61612
I also added a message to be displayed at runtime that informs the of this new change. However, this is for internal use and can be removed.