class Orocos::ROS::NameMappings
Implementation of the ROS name mappings rules
Attributes
mappings[R]
Public Class Methods
new(mappings = Hash.new)
click to toggle source
# File lib/orocos/ros/name_mappings.rb, line 7 def initialize(mappings = Hash.new) @mappings = mappings end
Public Instance Methods
apply(string)
click to toggle source
# File lib/orocos/ros/name_mappings.rb, line 11 def apply(string) mappings[string] || string end
to_command_line()
click to toggle source
# File lib/orocos/ros/name_mappings.rb, line 15 def to_command_line result = [] mappings.each do |from, to| if from =~ /^~/ from = "_#{from[1..-1]}" end result << "#{from}:=#{to}" end result.join(" ") end