That's the start and goal state of the PlanningScene in the Rviz MotionPlanning plugin. I am not sure that it is published anywhere, although you could add that functionality yourself. It is just a GUI, not the actual planning engine.
You could try pressing the `Plan` button in the Rviz plugin and read the MotionPlanRequest that is sent to the `move_group` capability. That should contain the start and goal state you are seeing in Rviz. But I am not sure that that's really the way you should be using it - the more common way to plan with MoveIt in code is to use a `MoveGroupInterface`, from which you can get the current start and goal state (although it's not the one displayed in Rviz), as well as the results of the `plan` and `move` functions when they are called.
If you are just teaching poses, a common way to get pose and joint positions from the current state of the system is to use e.g. `rosrun tf tf_echo` and `rostopic echo /joint_states`.
↧