diff --git a/plotjuggler/1dof_plotjuggler.xml b/plotjuggler/1dof_plotjuggler.xml deleted file mode 100644 index 88420ec165da17dbea6e252aedd0597d602dec4e..0000000000000000000000000000000000000000 --- a/plotjuggler/1dof_plotjuggler.xml +++ /dev/null @@ -1,65 +0,0 @@ -<?xml version='1.0' encoding='UTF-8'?> -<root> - <tabbed_widget name="Main Window" parent="main_window"> - <Tab tab_name="1dof" containers="1"> - <Container> - <DockSplitter sizes="1" count="1" orientation="-"> - <DockArea name="..."> - <plot flip_y="false" style="Lines" flip_x="false" mode="TimeSeries"> - <range top="91.788750" bottom="-2.238750" left="1720086654.971578" right="1720086664.971490"/> - <limitY/> - <curve name="/angles_1dof/plotjuggler/data" color="#1f77b4"/> - <curve name="/simple_robot/angles_1dof/plotjuggler/data" color="#1ac938"/> - </plot> - </DockArea> - </DockSplitter> - </Container> - </Tab> - <currentTabIndex index="0"/> - </tabbed_widget> - <use_relative_time_offset enabled="0"/> - <!-- - - - - - - - - - - - - - - --> - <!-- - - - - - - - - - - - - - - --> - <Plugins> - <plugin ID="DataLoad CSV"> - <parameters time_axis="" delimiter="0"/> - </plugin> - <plugin ID="DataLoad MCAP"/> - <plugin ID="DataLoad ROS2 bags"> - <use_header_stamp value="false"/> - <discard_large_arrays value="true"/> - <max_array_size value="100"/> - <boolean_strings_to_number value="true"/> - <remove_suffix_from_strings value="true"/> - <selected_topics value=""/> - </plugin> - <plugin ID="DataLoad ULog"/> - <plugin ID="ROS2 Topic Subscriber"> - <use_header_stamp value="false"/> - <discard_large_arrays value="true"/> - <max_array_size value="100"/> - <boolean_strings_to_number value="true"/> - <remove_suffix_from_strings value="true"/> - <selected_topics value="/simple_robot/angles_1dof/plotjuggler"/> - </plugin> - <plugin ID="UDP Server"/> - <plugin ID="WebSocket Server"/> - <plugin ID="ZMQ Subscriber"/> - <plugin ID="Fast Fourier Transform"/> - <plugin ID="Quaternion to RPY"/> - <plugin ID="Reactive Script Editor"> - <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++ indeces, not Lua indeces
 for index=0, series:size()-1 do
 x,y = series:at(index)
 series:set(index, x + delta_x, y + delta_y)
 end
end
"/> - <scripts/> - </plugin> - <plugin ID="CSV Exporter"/> - <plugin ID="ROS2 Topic Re-Publisher"/> - </Plugins> - <!-- - - - - - - - - - - - - - - --> - <previouslyLoaded_Datafiles/> - <previouslyLoaded_Streamer name="ROS2 Topic Subscriber"/> - <!-- - - - - - - - - - - - - - - --> - <customMathEquations/> - <snippets/> - <!-- - - - - - - - - - - - - - - --> -</root> - diff --git a/plotjuggler/2dof_plotjuggler.xml b/plotjuggler/2dof_plotjuggler.xml deleted file mode 100644 index 4e03709a3b6210632fa70e0427d2aa2ee8d1dc9f..0000000000000000000000000000000000000000 --- a/plotjuggler/2dof_plotjuggler.xml +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version='1.0' encoding='UTF-8'?> -<root> - <tabbed_widget name="Main Window" parent="main_window"> - <Tab tab_name="tab1" containers="1"> - <Container> - <DockSplitter sizes="0.500546;0.499454" count="2" orientation="-"> - <DockArea name="..."> - <plot flip_y="false" style="Lines" flip_x="false" mode="TimeSeries"> - <range top="91.788750" bottom="-2.238750" left="1.550179" right="11.500398"/> - <limitY/> - <curve name="/angle_2dof/plotjuggler/data" color="#1f77b4"/> - <curve name="/simple_robot/angle_2dof/plotjuggler/data" color="#1f77b4"/> - </plot> - </DockArea> - <DockArea name="..."> - <plot flip_y="false" style="Lines" flip_x="false" mode="TimeSeries"> - <range top="1.019875" bottom="-0.024875" left="1.550294" right="11.500428"/> - <limitY/> - <curve name="/height_2dof/plotjuggler/data" color="#d62728"/> - <curve name="/simple_robot/height_2dof/plotjuggler/data" color="#d62728"/> - </plot> - </DockArea> - </DockSplitter> - </Container> - </Tab> - <currentTabIndex index="0"/> - </tabbed_widget> - <use_relative_time_offset enabled="1"/> - <!-- - - - - - - - - - - - - - - --> - <!-- - - - - - - - - - - - - - - --> - <Plugins> - <plugin ID="DataLoad CSV"> - <parameters time_axis="" delimiter="0"/> - </plugin> - <plugin ID="DataLoad MCAP"/> - <plugin ID="DataLoad ROS2 bags"> - <use_header_stamp value="false"/> - <discard_large_arrays value="true"/> - <max_array_size value="100"/> - <boolean_strings_to_number value="true"/> - <remove_suffix_from_strings value="true"/> - <selected_topics value=""/> - </plugin> - <plugin ID="DataLoad ULog"/> - <plugin ID="ROS2 Topic Subscriber"> - <use_header_stamp value="false"/> - <discard_large_arrays value="true"/> - <max_array_size value="100"/> - <boolean_strings_to_number value="true"/> - <remove_suffix_from_strings value="true"/> - <selected_topics value="/simple_robot/angle_2dof/plotjuggler;/simple_robot/height_2dof/plotjuggler"/> - </plugin> - <plugin ID="UDP Server"/> - <plugin ID="WebSocket Server"/> - <plugin ID="ZMQ Subscriber"/> - <plugin ID="Fast Fourier Transform"/> - <plugin ID="Quaternion to RPY"/> - <plugin ID="Reactive Script Editor"> - <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++ indeces, not Lua indeces
 for index=0, series:size()-1 do
 x,y = series:at(index)
 series:set(index, x + delta_x, y + delta_y)
 end
end
"/> - <scripts/> - </plugin> - <plugin ID="CSV Exporter"/> - <plugin ID="ROS2 Topic Re-Publisher"/> - </Plugins> - <!-- - - - - - - - - - - - - - - --> - <previouslyLoaded_Datafiles/> - <previouslyLoaded_Streamer name="ROS2 Topic Subscriber"/> - <!-- - - - - - - - - - - - - - - --> - <customMathEquations/> - <snippets/> - <!-- - - - - - - - - - - - - - - --> -</root> - diff --git a/plotjuggler/3dof_plotjuggler.xml b/plotjuggler/3dof_plotjuggler.xml deleted file mode 100644 index 7e3c7218b2bbfe0abeb4fc5c29e4d4700e441600..0000000000000000000000000000000000000000 --- a/plotjuggler/3dof_plotjuggler.xml +++ /dev/null @@ -1,81 +0,0 @@ -<?xml version='1.0' encoding='UTF-8'?> -<root> - <tabbed_widget name="Main Window" parent="main_window"> - <Tab containers="1" tab_name="tab1"> - <Container> - <DockSplitter orientation="-" count="3" sizes="0.333698;0.332604;0.333698"> - <DockArea name="..."> - <plot mode="TimeSeries" flip_x="false" style="Lines" flip_y="false"> - <range bottom="-2.238750" left="7.850299" right="17.799757" top="91.788750"/> - <limitY/> - <curve color="#1f77b4" name="/angle_3dof/plotjuggler/data"/> - <curve color="#1f77b4" name="/simple_robot/angle_3dof/plotjuggler/data"/> - </plot> - </DockArea> - <DockArea name="..."> - <plot mode="TimeSeries" flip_x="false" style="Lines" flip_y="false"> - <range bottom="-0.004800" left="17.849878" right="21.050166" top="0.196800"/> - <limitY/> - <curve color="#d62728" name="/height_3dof/plotjuggler/data"/> - <curve color="#d62728" name="/simple_robot/height_3dof/plotjuggler/data"/> - </plot> - </DockArea> - <DockArea name="..."> - <plot mode="TimeSeries" flip_x="false" style="Lines" flip_y="false"> - <range bottom="-0.002800" left="17.849906" right="21.050229" top="0.114800"/> - <limitY/> - <curve color="#1ac938" name="/length_3dof/plotjuggler/data"/> - <curve color="#1ac938" name="/simple_robot/length_3dof/plotjuggler/data"/> - </plot> - </DockArea> - </DockSplitter> - </Container> - </Tab> - <currentTabIndex index="0"/> - </tabbed_widget> - <use_relative_time_offset enabled="1"/> - <!-- - - - - - - - - - - - - - - --> - <!-- - - - - - - - - - - - - - - --> - <Plugins> - <plugin ID="DataLoad CSV"> - <parameters time_axis="" delimiter="0"/> - </plugin> - <plugin ID="DataLoad MCAP"/> - <plugin ID="DataLoad ROS2 bags"> - <use_header_stamp value="false"/> - <discard_large_arrays value="true"/> - <max_array_size value="100"/> - <boolean_strings_to_number value="true"/> - <remove_suffix_from_strings value="true"/> - <selected_topics value=""/> - </plugin> - <plugin ID="DataLoad ULog"/> - <plugin ID="ROS2 Topic Subscriber"> - <use_header_stamp value="false"/> - <discard_large_arrays value="true"/> - <max_array_size value="100"/> - <boolean_strings_to_number value="true"/> - <remove_suffix_from_strings value="true"/> - <selected_topics value="/simple_robot/height_3dof/plotjuggler;/simple_robot/length_3dof/plotjuggler;/simple_robot/angle_3dof/plotjuggler"/> - </plugin> - <plugin ID="UDP Server"/> - <plugin ID="WebSocket Server"/> - <plugin ID="ZMQ Subscriber"/> - <plugin ID="Fast Fourier Transform"/> - <plugin ID="Quaternion to RPY"/> - <plugin ID="Reactive Script Editor"> - <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++ indeces, not Lua indeces
 for index=0, series:size()-1 do
 x,y = series:at(index)
 series:set(index, x + delta_x, y + delta_y)
 end
end
"/> - <scripts/> - </plugin> - <plugin ID="CSV Exporter"/> - <plugin ID="ROS2 Topic Re-Publisher"/> - </Plugins> - <!-- - - - - - - - - - - - - - - --> - <previouslyLoaded_Datafiles/> - <previouslyLoaded_Streamer name="ROS2 Topic Subscriber"/> - <!-- - - - - - - - - - - - - - - --> - <customMathEquations/> - <snippets/> - <!-- - - - - - - - - - - - - - - --> -</root> -