module OroGen::TypekitMarshallers::ROS
Constants
- DEFAULT_BOXED_MSG_MAPPINGS
- DEFAULT_TYPE_TO_MSG
Public Class Methods
load_rosmap(path)
click to toggle source
Loads a rosmap file
These files are generated for each ROS transport. They contain the mapping from an oroGen type name to the corresponding ROS message name.
@return [Hash<String,String>] mapping from the oroGen type
name to the corresponding ROS message name
# File lib/orogen/marshallers/ros.rb, line 32 def self.load_rosmap(path) result = Hash.new File.readlines(path).each do |line| line = line.strip next if line.empty? type_name, ros_msg_name, ros_field_name = line.split(/\s+/) result[type_name] = ros_msg_name end result end
load_rosmap_by_package_name(name)
click to toggle source
# File lib/orogen/marshallers/ros.rb, line 43 def self.load_rosmap_by_package_name(name) pkg = Utilrb::PkgConfig.new("#{name}-transport-ros-#{OroGen.orocos_target}") if pkg.rosmap load_rosmap(pkg.rosmap) else raise ArgumentError, "the oroGen project #{name} does not have a rosmap" end end