KOOSVisu¶
- class mobrob_behcon.core.visualisation.KOOSVisu[source]¶
The class KOOSVisu
This class represents a visualization of the robot environment from a bird’s eye view. The different classes like Laser Scanner or Behaviour can draw on the canvas. Output is published as a video stream via a ROS Publisher.
Attributes
colours
Methods
__init__
()constructor
Clears the canvas.
draw_box
(pt1, pt2[, color])Draws a box on the canvas.
draw_cluster_points_laser
(points, cluster_labels)Draws a list of clustered points to canvas.
draw_cross_world
(point[, color, size])draw_crosses_world
(lst_points[, color, size])Draws a list of crosses to canvas.
draw_ellipse_world
(point, covariance, sigma)draw_line_world
(slope, offset[, color])draw_point_laser
(point[, color])Draws a dot on canvas.
draw_point_world
(point[, color])Draws a dot on canvas.
draw_points_laser
(lst_points[, color])Draws a list of points to canvas.
draw_points_world
(lst_points[, color])Draws a list of points to canvas.
draw_robot
([color])Draws the robot on the canvas as rectangle with the given color.
Sends out the canvas via the ROS publisher.
set_current_pose
(current_pose)Setter for robots current pose
to_visu_coord
(point)Converts a point in world coordinates to pixel coordinates on canvas.
Details
- draw_box(pt1, pt2, color=(255, 0, 0))[source]¶
Draws a box on the canvas. Box is defined by two points in robot space.
- draw_cluster_points_laser(points, cluster_labels)[source]¶
Draws a list of clustered points to canvas. Six different colors are available to color the clusters differently.
- draw_crosses_world(lst_points, color=(255, 255, 255), size=2)[source]¶
Draws a list of crosses to canvas.
- draw_point_laser(point, color=(255, 255, 255))[source]¶
Draws a dot on canvas. The dot is defined by one point in laser space.
- draw_point_world(point, color=(255, 255, 255))[source]¶
Draws a dot on canvas. The dot is defined by one point in world space.
- draw_points_world(lst_points, color=(255, 255, 255))[source]¶
Draws a list of points to canvas. points are defined in world space
- draw_robot(color=(0, 255, 0))[source]¶
Draws the robot on the canvas as rectangle with the given color.
- Parameters
color ((byte, byte, byte)) – color of robot on canvas, defaults to (0, 255, 0)