|Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.|
get NBV from set Pointcloud and robot state.Description: In this tutorial we calculate a nbv from a set pointcloud from a previous tutorial, using a given robot state.
Tutorial Level: BEGINNER
In this tutorial we calculate a nbv from a set pointcloud from a previous tutorial, using a given robot state.
Finish the previous tutorial, we expect you to use the alternative pointcloud from the download section. The following image describes the result/setup condition for this tutorial:
- run setBase(-0.25, 2, 90) to set the robot position.
- run setPTU(-10, 10) and your rviz should look like this now:
- run getNBV() to get the nbv from our current position
- save the calculated nbv in the nbv variable using nbv = _
- add the topic tutGetNBVTopic described in the following image, if you can't find it do the next step, then this step and proceed with the next step
- run showNBVs(nbv) or showPoses(getPoseFromNBV(nbv)) to display the calculated next best viewport as a red arrow:
- to get the robot state of the new found nbv run getPositionAndOrientationFromNBV(nbv), which returns a 2-tuple that can be given to the setPositionAndOrientation function
- to move to the location run moveBase(*getPositionAndOrientationFromNBV(nbv))
- run setPTU(*getPositionAndOrientationFromNBV(nbv)) to set the orientation properly