ark::gui

Enums

Typedefs

Defined in “ark/gui/forward.hh”:

Defined in “ark/gui/listeners.hh”:

  • using RendererMousePositionListener = std::function< void(const RendererMousePositionEvent &)>
    The callback used to update when there are mouse position changes.

  • using RendererMouseButtonListener = std::function< void(const RendererMouseButtonEvent &)>
    The callback used to update when there are mouse button presses.

  • using RendererMouseWheelListener = std::function< void(const WheelEvent &)>
    The callback used to update when there are mouse wheel scrolls.

Defined in “ark/gui/magnum/mesh_drawable.hh”:

  • using Drawable3D = Magnum::SceneGraph::Drawable3D

  • using DrawableGroup3D = Magnum::SceneGraph::DrawableGroup3D

  • using Object3D = Magnum::SceneGraph::Object< Magnum::SceneGraph::MatrixTransformation3D >

  • using Scene3D = Magnum::SceneGraph::Scene< Magnum::SceneGraph::MatrixTransformation3D >

Defined in “ark/gui/magnum/mesh_variant.hh”:

Defined in “ark/gui/plugin_interface.hh”:

  • using KeyboardCallback = std::function< void()>
    A callback for keyboard shortcuts.

Defined in “ark/gui/plugin_set.hh”:

Defined in “ark/gui/topology_callback.hh”:

  • using TopologyChangeCallback = std::function< void(PluginInterface &, const TopologyChangeEvent &)>
    A callback that is invoked when topology shifts this includes the plugin that caused the shift, along with all of the newly added publishers/subscribers.

Variables

Defined in “ark/gui/well_known_gui_channels.hh”:

  • constexpr auto *const RENDERER_LAYER_NAME= “/gui/renderer_layer”
    All renderer layers flow over this channel these are rendered in video or in the 3D display in the GUI.

  • constexpr auto *const RENDERER_LAYER_NAMESPACE_NAME= “/gui/renderer_layers”
    Any renderer layer or renderer set that is published under this namespace will be picked up and rendered by the GUI.

  • constexpr auto *const CHANNEL_INFO_NAME= “/gui/plugins/channel_info”
    Channel information from the pipeline that a plugin set is connected to flows over this channel. This is useful for dynamically discovering channels that you could connect to.

  • constexpr auto *const GUI_COMMS_INFO_NAME= “/gui/plugins/comms_info”
    Communication information from the GUI (client) side. All of the GUI’s comms status information is sent on this channel periodically. Useful for plugins/controls related to the GUI itself.

  • constexpr auto *const RENDERER_MOUSE_POSITION_NAME= “/gui/renderer/events/mouse/position”
    Publishes renderer mouse position events. This allows plugins to understand where the mouse cursor is in screen and world terms.

  • constexpr auto *const RENDERER_MOUSE_BUTTON_NAME= “/gui/renderer/events/mouse/button”
    Publishes mouse button events that are coming in over the renderer.

Classes

Functions

Declared in “ark/gui/camera.hh”:

  • Eigen::Matrix4d orthographic_projection(double left, double right, double bottom, double top, double near_val, double far_val)
    Construct the transform matrix that would be created by glOrtho().

    left, right Specify the coordinates for the left and right vertical clipping planes. bottom, top Specify the coordinates for the bottom and top horizontal clipping planes. near, far Specify the distances to the nearer and farther depth clipping planes. These values are negative if the plane is to be behind the viewer. glOrtho describes a transformation that produces a parallel projection.

  • Eigen::Matrix4d perspective_projection(double fovy_radians, double aspect, double near, double far)
    Construct the transform matrix that would be created by gluPerspective().

    fovy Specifies the field of view angle, in degrees, in the y direction. aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height). zNear Specifies the distance from the viewer to the near clipping plane (always positive). zFar Specifies the distance from the viewer to the far clipping plane (always positive). gluPerspective specifies a viewing frustum into the world coordinate system.

Declared in “ark/gui/color.hh”:

  • Rgba to_rgba(const std::array< float, 3 > & color, float alpha)
    Helper function to convert to the gui Rgba type.

  • Rgba to_rgba(const std::array< uint8_t, 3 > & color, uint8_t alpha)

  • Rgba to_rgba(const ColorName & color, uint8_t alpha)

Declared in “ark/gui/example/renderer_layers.hh”:

  • std::string get_filepath(const std::filesystem::path & path)

  • Rgba transparent_gray()

  • void build_counter_clockwise_mesh_box2(Mesh3Builder & builder, float scale, bool use_single_color)

  • void build_counter_clockwise_mesh_box3(Mesh3Builder & builder, float scale, bool use_single_color)

  • void build_counter_clockwise_mesh_box(Mesh3Builder & builder, MeshPositionComponents components, float scale, bool use_single_color)

  • image::Image make_4x4_rgbw_image()

  • std::shared_ptr< RendererLayer > make_mesh3_points(Transform3d pose, MeshPositionComponents components, bool use_single_color, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_mesh3_lines(Transform3d pose, MeshPositionComponents components, bool use_single_color, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_mesh3_line_loop(Transform3d pose, MeshPositionComponents components, bool use_single_color, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_mesh3_line_strip(Transform3d pose, MeshPositionComponents components, bool use_single_color, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_mesh3_triangles(Transform3d pose, MeshPositionComponents components, bool use_single_color, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_mesh3_texture(Transform3d pose, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_primitive_axis2(Transform3d pose, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_primitive_axis3(Transform3d pose, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_primitive_capsule2(Transform3d pose, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_primitive_capsule3(Transform3d pose, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_primitive_circle(Transform3d pose, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_primitive_cone(Transform3d pose, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_primitive_crosshair2(Transform3d pose, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_primitive_crosshair3(Transform3d pose, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_primitive_cube(Transform3d pose, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_primitive_cylinder(Transform3d pose, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_primitive_grid(Transform3d pose, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_primitive_plane(Transform3d pose, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_primitive_sphere(Transform3d pose, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_text3(Transform3d pose, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_scene_glb(Transform3d pose, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_scene_obj(Transform3d pose, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_scene_ply(Transform3d pose, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_scene_custom(Transform3d pose, std::string url, std::string frame_id, std::chrono::steady_clock::time_point ts)

  • std::shared_ptr< RendererLayer > make_hud_image(HudAnchor anchor)

  • std::shared_ptr< RendererLayer > make_hud_text(HudAnchor anchor)

  • void add_example_layers_to_renderer(Renderer & renderer)

Declared in “ark/gui/foxglove/protobuf.hh”:

  • void convert(google::protobuf::Timestamp & out, const std::chrono::steady_clock::time_point & in)
    Helper functions to convert from ark gui renderer layers to foxglove compatible messages.

  • void convert(google::protobuf::Timestamp & out, const std::chrono::system_clock::time_point & in)

  • void convert(foxglove::Color & out, const Rgba & in)

  • void convert(foxglove::Vector3 & out, const Vector3f & in)

  • void convert(foxglove::Vector3 & out, const Vector3d & in)

  • void convert(foxglove::Quaternion & out, const Quaterniond & in)

  • void convert(foxglove::Pose & out, const TransformMessage3d & in)

  • void convert(foxglove::CubePrimitive & out, const Primitive & in)

  • void convert(foxglove::SpherePrimitive & out, const Primitive & in)

  • void convert(foxglove::CylinderPrimitive & out, const Primitive & in)

  • void convert(foxglove::LinePrimitive & out, const Mesh3 & in)

  • void convert(foxglove::TriangleListPrimitive & out, const Mesh3 & in)

  • void convert(foxglove::TextPrimitive & out, const Text3 & in)

  • void convert(foxglove::PointCloud & out, const Mesh3 & in)

  • void convert(foxglove::ModelPrimitive & out, const Scene & in)

  • std::string to_foxglove_encoding(const image::ImageDataFormat & format)

  • size_t get_pixel_stride(const image::ImageDataFormat & format)

  • void convert(foxglove::RawImage & out, const image::Image & in)

  • void convert(foxglove::CompressedImage & out, const image::Image & in)

  • void convert(foxglove::CompressedVideo & out, const image::Image & in)

  • std::map< std::string, std::shared_ptr< google::protobuf::Message > > to_protobuf(const RendererLayer & layer)

  • foxglove::FrameTransforms to_protobuf(const TransformMessages3dStamped & in)

  • std::shared_ptr< google::protobuf::Message > to_protobuf(const image::Image & in)

  • foxglove::LocationFix to_protobuf(const gps::GpsFix & in)

  • void convert(foxglove::Log & out, const debuglog::DebugLogOutput & in)

  • std::vector< std::shared_ptr< google::protobuf::Message > > to_protobuf(const debuglog::DebugLogOutputGroup & group)

Declared in “ark/gui/gui/ark_icon.hh”:

  • QIcon ark_icon()
    Get the ark icon as a qt element.

Declared in “ark/gui/hud_layout.hh”:

Declared in “ark/gui/image.hh”:

  • QImage apply_jet_colors(const image::Image & image)
    Takes an input Image and applies the jet colorscheme to it, returning a QImage suitable for rendering.

  • QImage camera_image_to_qt(const image::Image & image)
    Translates a Qt image into a Image, taking into account data format. This does not make a copy; it simply references the raw image data. ‘image’ must remain in scope for the lifetime of this image.

  • void apply_image_to_label(const image::Image & image, QLabel * label)
    Takes the given camera image and applies it to the specified label. This allows you to display images within Qt labels.

Declared in “ark/gui/local_debug.hh”:

  • void show(image::Image image, std::optional< std::string > name)
    Display the given image in a named window. If the window already exists the displayed image will be replaced.

    NOTE: If no name is specified than the default “Ark Image” will be used.

  • void show(std::shared_ptr< const image::Image > image, std::optional< std::string > name)

  • void show(RendererLayer layer, std::optional< std::string > name)
    Render the given layer in a named window. If the window already exists the rendered layer will be replaced.

    NOTE: If no name is specified than the layer name will be used, if that is empty than the default “Ark Layer” will be used.

  • void show(std::shared_ptr< const RendererLayer > layer, std::optional< std::string > name)

  • void wait_key(std::optional< std::chrono::milliseconds > dt)
    Wait until either dt time has passed or any key is pressed. If dt is not set it will wait indefinitely until a key is pressed.

Declared in “ark/gui/magnum/convert.hh”:

  • Magnum::Text::Alignment to_magnum(TextAlignment alignment)

  • Magnum::Color4 to_magnum(Rgba in)

  • Magnum::Vector2 to_magnum(const Vector2f & in)

  • Magnum::Vector3 to_magnum(const Vector3f & in)

  • Magnum::Matrix4 to_magnum(const Eigen::Matrix4f & in)

  • Magnum::MeshPrimitive to_magnum(MeshType in)

  • Magnum::Image2D to_magnum(const image::Image & in)

  • ViewportParameters to_ark(const Magnum::Range2Di & in)

  • image::Image to_ark(const Magnum::Image2D & in)

Declared in “ark/gui/magnum/mesh_variant.hh”:

  • MeshVariant make_mesh_variant(const Mesh3 & object)
    Construct the mesh variant for the given ark mesh3.

  • MeshVariant make_mesh_variant(const Primitive & object)
    Construct the mesh variant from the given ark primitive.

Declared in “ark/gui/pose_axes.hh”:

  • gui::Mesh3 make_pose_axes_vis(ForwardIt first, ForwardIt last, double length)
    Makes a pose axes visualization over the given container. This will visualize all of the individual pose axes as a series of lines.

Declared in “ark/gui/render_image.hh”:

  • std::pair< ark::Vector2f, ark::Vector2f > calculate_layer_extents(const std::vector< RendererLayer > & layers)
    Returns the extent of the position data contained within the given set of layers. This only uses data contained within object types, but may be extended in the future to include primitives.

  • image::Image render_to_image(std::vector< gui::RendererLayer > layers, uint32_t output_width, uint32_t output_height, std::optional< gui::CameraLookAt > camera_target)
    Used to render a set of renderer layers to an image. The resultant image is returned. If you leave the camera position uninitialized, the system will attempt to calculate a position for you based on the object span.

  • void render_to_jpeg(const std::filesystem::path & output_path, const std::vector< gui::RendererLayer > & layers, uint32_t output_width, uint32_t output_height, std::optional< gui::CameraLookAt > camera_target, size_t jpeg_quality)
    Renders the given set of renderer layers and emits them to the given JPEG filename. Follows similar rules to the standard render_to_image if camera target is omitted, it will be computed for you based on the position data within the layer objects.

Declared in “ark/gui/urdf.hh”:

  • RendererLayer make_urdf_model_layer(const std::string & layer_name, const urdf::ModelInterface & urdf)