ark::gui
Enums
-
GuiDockSide (int32_t)
The side of the dock to install a plugin on. -
PluginBridgeEventType
The type of bridge activity that occurred. -
PluginPublisherEventType
The type of publisher activity that occurred.
Typedefs
Defined in “ark/gui/forward.hh”:
-
using PluginPtr = std::shared_ptr< Plugin >
-
using PluginInterfacePtr = std::shared_ptr< PluginInterface >
-
using PluginCommsManagerPtr = std::shared_ptr< PluginCommsManager >
-
using PluginSubscriberBridgeBasePtr = std::shared_ptr< PluginSubscriberBridgeBase >
-
using RendererInterfacePtr = std::shared_ptr< RendererInterface >
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”:
- using MeshVariant = std::variant< NullMesh, FlatMesh, PhongMesh, VertexColorMesh, MeshCollection >
Defined in “ark/gui/plugin_interface.hh”:
- using KeyboardCallback = std::function< void()>
A callback for keyboard shortcuts.
Defined in “ark/gui/plugin_set.hh”:
- using AbstractHttpRequestPtr = std::shared_ptr< AbstractHttpRequest >
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
-
ark::gui::AbstractHttpRequest
An asynchronous HTTP request, done this way to avoid leaking the underlying futures to the world. -
ark::gui::FoxgloveServer
Helper class to manage the foxglove websocket. This is a simple wrapper that simply broadcasts ark renderer layers to all clients. -
ark::gui::FoxgloveServerStage
Foxglove server stage. -
ark::gui::GuiApplication
This is a graphical user interface application, allowing you to construct the basic window/frame, and then add in plugins, before turning control over to the main message pump.It is roughly the equivalent of pipelines and executors, for GUIs.
-
ark::gui::GuiChannelsPlugin
This plugin visualizes the connected GUI Channels. -
ark::gui::GuiCommunicationsPlugin
This plugin visualizes the GUI communication statistics. -
ark::gui::HeadlessMagnumRenderer
This class provides an interface that wraps the magnum renderer in a worker thread so the user does not have to worry about OpenGl threading issues. It ensures that all the functions required to be called from the same thread are. -
ark::gui::HeadlessRendererStage
A stage that wraps a headless renderer, useful for rendering 3D scenes to videos. Pair the output of this (images) to a video encoding stage. -
ark::gui::HudImageDrawable
Drawable for 2D HUD Image. Coordinates are specified in normalized screen coordinates. -
ark::gui::LocalRenderer
Class that provides a local renderer (i.e. can open a renderer/image viewer).NOTE: This renderer uses Qt for visualization and creates/owns the QApplication object. Therefore it cannot be used by any qt application executables.
-
ark::gui::LocalRendererHandler
Qt object used for handling the signals emitted from the calling threads, all slots are expected to be processed on the application queue. -
ark::gui::LocalRendererSignaler
Qt object used for emitting signals from the calling thread to the background application thread. -
ark::gui::MeasurementPlugin
This plugin allows you to take simple measurements in the 3D visualizer. -
ark::gui::Plugin
This is an abstract class that allows you to define custom plugins. These “plug into” a Qt GUI and allow you to setup tabs and other GUI elements, along with support for registering comms methods for communicating with the rest of the stack. -
ark::gui::PluginCommsManager
This structure holds the communication (pub/sub) for a particular plugin, allowing plugins to dynamically subscribe (or publish) to new channels during normal operation. -
ark::gui::PluginInterface
This structure is an abstraction, allowing plugins to register their widgets, subscribers, and other methods.This was intended to separate I/O of a plugin into a separate layer.
-
ark::gui::PluginSet
A plugin set is a grouping of plugins, allowing you to easily poll and dispatch messages over all of the plugins at once.This also handles some common initialization code for you.
-
ark::gui::PluginSubscriberBridge
This class wraps pipeline subscribers, allowing you to deserialize incoming messages (bytes) and push them onto subscribers, without knowing the type. -
ark::gui::PluginSubscriberBridgeBase
The abstract version of the subscriber bridge, to make it possible to publish messages to plugins without knowing the type. -
ark::gui::RendererInterface
The public interface that is passed into plugins to allow them register 3D data to render. -
ark::gui::RendererInterfacePlugin
This plugin provides a generic way for any stage to emit a 3D drawable without needing to create a plugin. -
ark::gui::RendererWidget
This widget is used to allow plugins to render 3D geometry. For example, this viewport allows you to visualize pointclouds, detected objects, etc. It works by taking in rendering layers, which provide arrays of data to be visualized.It also catches mouse actions so that it can manipulate the camera in a consistent fashion.
-
ark::gui::ShaderManager
Structure that contains the standard shader set used for rendering generic gui layers. These are shared to all drawables so we do not need to recompile shaders per layer. -
ark::gui::FoxgloveServerConfig
Configuration for the foxglove server. -
ark::gui::GuiApplicationConfig
Configuration for the GUI application. This allows you to add in your own arguments, or to configure some elements of tab display. -
ark::gui::PluginBridgeEvent
A plugin bridge event. These are generated when you add bridges and allows the downstream interface to handle additions/removals. -
ark::gui::PluginPublisherEvent
A plugin publisher event. These are generated when you add publishers and allows the downstream interface to handle additions/removals. -
ark::gui::PluginSetConfiguration
Configuration for your plugin set. Allows you to set things like the host that you communicate with. -
ark::gui::PluginSubscriberConnectionConfig
A structure containing connection-related configuration. -
ark::gui::SubscriberConfiguration
A structure representing subscriber configuration for a plugin. Note that this is a bit different than the pipeline subscriber configuration, in that we expose different options. -
ark::gui::TopologyChangeEvent
An event message containing a list of publishers/subscribers that were recently added by a particular plugin. -
ark::gui::WebSocketPluginMapping
This maps a websocket client to a plugin bridge, allowing you to subscribe to remote messages.
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”:
- void layout_hud(const std::vector< AbstractHudDrawable * > & all_drawables)
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)