An Rviz tool that visualizes a given geometry as the cursor and orients the object normal to objects in the scene. On a click of the left mouse button, the tool will publish the 3D point and 6D pose of the object on which the cursor rests. When multiple points are clicked, the tool will display all selection points and lines connecting them and will publish a message containing all the current selection points.
- Left mouse button: Add a selection point (triggers the publication of the point, pose, and pose array messages)
- Left mouse button hold: Adds selection points when lasso mode is enabled
- Right mouse button: Deactivates the tool
- Center mouse button: Clears the current selection points and boundary
The base class of the tool cursor has the following properties:
Pose Topic
: The topic on which to publish the 6D pose in the Rviz environment when the left mouse button is clickedPoint Topic
: The topic on which to publish the 3D point (no orientation) in the Rviz environment when the left mouse button is clicked.- Note: If you want this to match the output of the
Publish Point
tool, you can remap/tool_cursor_point
to/clicked_point
. Alternatively, you can edit this in thePanels > Tool Properties
menu.
- Note: If you want this to match the output of the
Pose Array Topic
: The topic on which to publish the vector of 6D poses that have been selected in the Rviz environment when the left mouse button is clickedPatch Size
: The number of pixels on a side with which to create a patch used for estimated the surface normalLasso Mode
: Toggle lasso mode where selection points are constantly acquired when the left mouse button is held downClose Loop
: Toggle the visualization of the line connecting the last point to the first pointShow Points
: Toggle the display of the selection pointsShow Lines
: Toggle the display of the lines connecting the selection pointsPoint Color
: Controls the color of the selection pointsLine Color
: Controls the color of the selection boundary linesPoint Size
: Controls the size (in pixels) of the selection points
The mesh tool cursor visualizes a specified mesh file (.stl or .ply) as the cursor. The tool has the following additional properties:
Mesh Filename
: The filename of the mesh file to be displayed (supports package:// and file:// URIs)Color
: The color of the cursor visualization
The circle tool cursor visualizes a 2D circle of specified radius as the cursor. The tool has the following additional properties:
Radius
: The radius of the circle visualizationColor
: The color of the cursor visualization
In order to create a custom Rviz tool cursor, the ToolCursor
base class requires the implementation of the virtual function createToolVisualization()
which defines the cursor visualization: