ark::ros

Classes

  • ark::ros::BagReader
    This class allows you to read ROS ‘bag’ files and pull out various pieces of metadata and/or objects.

  • ark::ros::RosCommStage

  • ark::ros::RosmsgRegistry
    This registry allows you to access schema information for all of your rosmsg definitions, providing convenient accessors over the standard SchemaRegistry for ROS-specific types.

  • ark::ros::BagTopic
    Topic information, storing enough information about a connection to deserialize further.

  • ark::ros::BaggedObject
    A bagged object contains the raw data of the message, along with various pieces of topic information suitable for printing out.

  • ark::ros::ParsedRosmsgResult
    A result from parsing rosmsg (parse_rosmsg). See comments there for more details.

Functions

Declared in “ark/ros/rosmsg_generator.hh”:

  • std::string generate_rosmsg_definition(const serialization::SchemaRegistry & registry, const std::string & root_type)
    Generate the rosmsg definition string for the type given schema registry. NOTE: This does not account for constants at this time.

  • std::string compute_rosmsg_md5_text(const serialization::SchemaRegistry & registry, const std::string & root_type)
    Generate the rosmsg md5sum string for the type given schema registry. NOTE: This does not account for constants at this time.

Declared in “ark/ros/rosmsg_helpers.hh”:

  • std::string ros_name_from_type_name(const std::string & type_name)
    Convert from an object type name (e.g. std_msgs::String) to the rosmsg name (std_msgs/String).

  • std::string type_name_from_ros_name(const std::string & ros_name)
    Convert from a rosmsg type name (e.g. std_msgs/String) to the object type name (std_msgs::String)

  • std::string remove_ros_package_from_ros_name(const std::string & name)
    Remove the ros package name from the given ros type name. e.g. ‘std_msgs/String’ -> ‘String’.

Declared in “ark/ros/rosmsg_parser.hh”:

  • std::string path_to_ros_type(const std::filesystem::path & path)
    Converts a path into a ROS type name, based on ROS conventions.

  • ParsedRosmsgResult parse_rosmsg(const std::filesystem::path & file_path, const std::string_view & definition)
    This API parses a single rosmsg message definition into a schema registry. Note that one rosmsg definition can contain multiple individual schemas (with the === separators), and this will return all of them.

    This is a convenience API, and will take the file path and derive a ROS type name from it. The first (primary) type will be returned as well.

  • ParsedRosmsgResult parse_rosmsg(const std::string & ros_type_name, const std::filesystem::path & file_path, const std::string_view & definition)
    This API parses a single rosmsg message definition into a schema registry. Note that one rosmsg definition can contain multiple individual schemas (with the === separators), and this will return all of them.

    “File Path” here is used for debugging (for outputting error messages). The first (primary) type will be returned as well.