|
| 1 | +<?xml version='1.0' encoding='UTF-8'?> |
| 2 | +<root> |
| 3 | + <tabbed_widget parent="main_window" name="Main Window"> |
| 4 | + <Tab containers="1" tab_name="DiffBot"> |
| 5 | + <Container> |
| 6 | + <DockSplitter orientation="-" sizes="0.300292;0.300292;0.399417" count="3"> |
| 7 | + <DockArea name="..."> |
| 8 | + <plot flip_y="false" mode="TimeSeries" flip_x="false" style="LinesAndDots"> |
| 9 | + <range top="0.717500" bottom="-0.017500" right="10.379761" left="2.746329"/> |
| 10 | + <limitY/> |
| 11 | + <curve name="/cmd_vel/twist/linear/x" color="#f1854c"/> |
| 12 | + <curve name="/diffbot_base_controller/cmd_vel_out/twist/linear/x" color="#d62728"/> |
| 13 | + </plot> |
| 14 | + </DockArea> |
| 15 | + <DockArea name="..."> |
| 16 | + <plot flip_y="false" mode="TimeSeries" flip_x="false" style="Lines"> |
| 17 | + <range top="1.025000" bottom="-0.025000" right="10.379761" left="2.746329"/> |
| 18 | + <limitY/> |
| 19 | + <curve name="/cmd_vel/twist/angular/z" color="#17becf"/> |
| 20 | + <curve name="/diffbot_base_controller/cmd_vel_out/twist/angular/z" color="#bcbd22"/> |
| 21 | + </plot> |
| 22 | + </DockArea> |
| 23 | + <DockArea name="..."> |
| 24 | + <plot flip_y="false" mode="TimeSeries" flip_x="false" style="LinesAndDots"> |
| 25 | + <range top="52.434211" bottom="-0.855263" right="10.379761" left="2.746329"/> |
| 26 | + <limitY/> |
| 27 | + <curve name="/controller_manager/introspection_data/values/state_interface.left_wheel_joint/velocity" color="#1f77b4"/> |
| 28 | + <curve name="/controller_manager/introspection_data/values/command_interface.left_wheel_joint/velocity" color="#d62728"/> |
| 29 | + <curve name="/controller_manager/introspection_data/values/command_interface.pid_controller_left_wheel_joint/left_wheel_joint/velocity" color="#1ac938"/> |
| 30 | + <curve name="/controller_manager/introspection_data/values/state_interface.right_wheel_joint/velocity" color="#1ac9bc"/> |
| 31 | + <curve name="/controller_manager/introspection_data/values/command_interface.right_wheel_joint/velocity" color="#ff7f0e"/> |
| 32 | + <curve name="/controller_manager/introspection_data/values/command_interface.pid_controller_right_wheel_joint/right_wheel_joint/velocity" color="#f14cc1"/> |
| 33 | + </plot> |
| 34 | + </DockArea> |
| 35 | + </DockSplitter> |
| 36 | + </Container> |
| 37 | + </Tab> |
| 38 | + <currentTabIndex index="0"/> |
| 39 | + </tabbed_widget> |
| 40 | + <use_relative_time_offset enabled="1"/> |
| 41 | + <!-- - - - - - - - - - - - - - - --> |
| 42 | + <!-- - - - - - - - - - - - - - - --> |
| 43 | + <Plugins> |
| 44 | + <plugin ID="DataLoad CSV"> |
| 45 | + <parameters delimiter="0" time_axis=""/> |
| 46 | + </plugin> |
| 47 | + <plugin ID="DataLoad MCAP"/> |
| 48 | + <plugin ID="DataLoad ROS2 bags"> |
| 49 | + <use_header_stamp value="false"/> |
| 50 | + <discard_large_arrays value="true"/> |
| 51 | + <max_array_size value="100"/> |
| 52 | + <boolean_strings_to_number value="true"/> |
| 53 | + <remove_suffix_from_strings value="true"/> |
| 54 | + <selected_topics value=""/> |
| 55 | + </plugin> |
| 56 | + <plugin ID="DataLoad ULog"/> |
| 57 | + <plugin ID="ROS2 Topic Subscriber"> |
| 58 | + <use_header_stamp value="false"/> |
| 59 | + <discard_large_arrays value="true"/> |
| 60 | + <max_array_size value="100"/> |
| 61 | + <boolean_strings_to_number value="true"/> |
| 62 | + <remove_suffix_from_strings value="true"/> |
| 63 | + <selected_topics value="/cmd_vel;/controller_manager/introspection_data/names;/controller_manager/introspection_data/values;/diffbot_base_controller/cmd_vel_out"/> |
| 64 | + </plugin> |
| 65 | + <plugin ID="UDP Server"/> |
| 66 | + <plugin ID="WebSocket Server"/> |
| 67 | + <plugin ID="ZMQ Subscriber"/> |
| 68 | + <plugin ID="Fast Fourier Transform"/> |
| 69 | + <plugin ID="Quaternion to RPY"/> |
| 70 | + <plugin ID="Reactive Script Editor"> |
| 71 | + <library code="--[[ Helper function to create a series from arrays

 new_series: a series previously created with ScatterXY.new(name)
 prefix: prefix of the timeseries, before the index of the array
 suffix_X: suffix to complete the name of the series containing the X value. If [nil], use the index of the array.
 suffix_Y: suffix to complete the name of the series containing the Y value
 timestamp: usually the tracker_time variable
 
 Example:
 
 Assuming we have multiple series in the form:
 
 /trajectory/node.{X}/position/x
 /trajectory/node.{X}/position/y
 
 where {N} is the index of the array (integer). We can create a reactive series from the array with:
 
 new_series = ScatterXY.new("my_trajectory") 
 CreateSeriesFromArray( new_series, "/trajectory/node", "position/x", "position/y", tracker_time );
--]]

function CreateSeriesFromArray( new_series, prefix, suffix_X, suffix_Y, timestamp )
 
 --- clear previous values
 new_series:clear()
 
 --- Append points to new_series
 index = 0
 while(true) do

 x = index;
 -- if not nil, get the X coordinate from a series
 if suffix_X ~= nil then 
 series_x = TimeseriesView.find( string.format( "%s.%d/%s", prefix, index, suffix_X) )
 if series_x == nil then break end
 x = series_x:atTime(timestamp)	 
 end
 
 series_y = TimeseriesView.find( string.format( "%s.%d/%s", prefix, index, suffix_Y) )
 if series_y == nil then break end 
 y = series_y:atTime(timestamp)
 
 new_series:push_back(x,y)
 index = index+1
 end
end

--[[ Similar to the built-in function GetSeriesNames(), but select only the names with a give prefix. --]]

function GetSeriesNamesByPrefix(prefix)
 -- GetSeriesNames(9 is a built-in function
 all_names = GetSeriesNames()
 filtered_names = {}
 for i, name in ipairs(all_names) do
 -- check the prefix
 if name:find(prefix, 1, #prefix) then
 table.insert(filtered_names, name);
 end
 end
 return filtered_names
end

--[[ Modify an existing series, applying offsets to all their X and Y values

 series: an existing timeseries, obtained with TimeseriesView.find(name)
 delta_x: offset to apply to each x value
 delta_y: offset to apply to each y value 
 
--]]

function ApplyOffsetInPlace(series, delta_x, delta_y)
 -- use C++ indices, not Lua indices
 for index=0, series:size()-1 do
 x,y = series:at(index)
 series:set(index, x + delta_x, y + delta_y)
 end
end
"/> |
| 72 | + <scripts/> |
| 73 | + </plugin> |
| 74 | + <plugin ID="CSV Exporter"/> |
| 75 | + <plugin ID="ROS2 Topic Re-Publisher"/> |
| 76 | + </Plugins> |
| 77 | + <!-- - - - - - - - - - - - - - - --> |
| 78 | + <previouslyLoaded_Datafiles/> |
| 79 | + <previouslyLoaded_Streamer name="ROS2 Topic Subscriber"/> |
| 80 | + <!-- - - - - - - - - - - - - - - --> |
| 81 | + <customMathEquations/> |
| 82 | + <snippets/> |
| 83 | + <!-- - - - - - - - - - - - - - - --> |
| 84 | +</root> |
0 commit comments