-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# PR Summary PR Link: [Link](#76) Issue Link: [Link](#75) ### Description Switches compilation-heavy submodules for pre-compiled debians to assist CI pipeline and embedded devices. ### Reviewers - Required: @MaxxWilson --- ### Changelog - Switches submodules to track VEXU_GHOST forks. - Changes setup_submodules.sh script to pull debians from new ghost_dependencies repository instead of compiling from source locally. - Skips debianized submodules in build and test scripts. - Skips building visualization packages on arm machines (jetson). - Adds reverse-ssh tunnel to CI pipeline for post-failure debugging.
- Loading branch information
Showing
13 changed files
with
290 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,49 @@ | ||
[submodule "01_Libraries/ghost_estimation/src/shared"] | ||
path = 01_Libraries/ghost_estimation/src/shared | ||
url = [email protected]:MaxxWilson/amrl_shared_lib.git | ||
url = [email protected]:VEXU-GHOST/amrl_shared_lib.git | ||
|
||
[submodule "09_External/yaml-cpp"] | ||
path = 09_External/yaml-cpp | ||
url = [email protected]:jbeder/yaml-cpp.git | ||
url = [email protected]:VEXU-GHOST/yaml-cpp.git | ||
|
||
[submodule "09_External/Casadi-Tutorial-CPP"] | ||
path = 09_External/Casadi-Tutorial-CPP | ||
url = [email protected]:zehuilu/Tutorial-on-CasADi-with-CPP.git | ||
url = [email protected]:VEXU-GHOST/Tutorial-on-CasADi-with-CPP.git | ||
|
||
[submodule "09_External/casadi"] | ||
path = 09_External/casadi | ||
url = https://github.com/casadi/casadi.git | ||
url = [email protected]:VEXU-GHOST/casadi.git | ||
|
||
[submodule "09_External/Ipopt"] | ||
path = 09_External/Ipopt | ||
url = [email protected]:MaxxWilson/Ipopt.git | ||
url = [email protected]:VEXU-GHOST/Ipopt.git | ||
|
||
[submodule "09_External/rplidar_ros"] | ||
path = 09_External/rplidar_ros | ||
url = [email protected]:Slamtec/rplidar_ros.git | ||
url = [email protected]:VEXU-GHOST/rplidar_ros.git | ||
branch = ros2 | ||
|
||
[submodule "09_External/matplotlib-cpp"] | ||
path = 09_External/matplotlib-cpp | ||
url = [email protected]:MaxxWilson/matplotlib-cpp.git | ||
url = [email protected]:VEXU-GHOST/matplotlib-cpp.git | ||
|
||
[submodule "09_External/ThirdParty-Mumps"] | ||
path = 09_External/ThirdParty-Mumps | ||
url = [email protected]:MaxxWilson/ThirdParty-Mumps.git | ||
url = [email protected]:VEXU-GHOST/ThirdParty-Mumps.git | ||
branch = with-src | ||
|
||
[submodule "09_External/BehaviorTree.CPP"] | ||
path = 09_External/BehaviorTree.CPP | ||
url = [email protected]:BehaviorTree/BehaviorTree.CPP.git | ||
url = [email protected]:VEXU-GHOST/BehaviorTree.CPP.git | ||
|
||
[submodule "09_External/BehaviorTree.ROS2"] | ||
path = 09_External/BehaviorTree.ROS2 | ||
url = https://github.com/JakeWendling/BehaviorTree.ROS2 | ||
url = [email protected]:VEXU-GHOST/BehaviorTree.ROS2.git | ||
|
||
[submodule "09_External/plotjuggler"] | ||
path = 09_External/plotjuggler | ||
url = [email protected]:VEXU-GHOST/PlotJuggler.git | ||
|
||
[submodule "09_External/plotjuggler-ros-plugins"] | ||
path = 09_External/plotjuggler-ros-plugins | ||
url = [email protected]:VEXU-GHOST/plotjuggler-ros-plugins.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
cmake_minimum_required(VERSION 3.8) | ||
project(ghost_viz) | ||
|
||
# Add Global CMake Config for Ghost Packages | ||
set(Ghost_DIR "$ENV{VEXU_HOME}/cmake") | ||
find_package(Ghost CONFIG REQUIRED) | ||
|
||
# Adds all our package dependencies to one list | ||
set(DEPENDENCIES | ||
ament_cmake | ||
) | ||
|
||
# Iterates through the list and finds the packages! | ||
foreach(pkg ${DEPENDENCIES}) | ||
find_package(${pkg} REQUIRED) | ||
endforeach() | ||
|
||
# Tell any packages that depend on us what dependencies we need. | ||
ament_export_dependencies(${DEPENDENCIES}) | ||
|
||
install(DIRECTORY | ||
config | ||
launch | ||
DESTINATION share/${PROJECT_NAME}) | ||
|
||
# This generates the ROS2 package and should always be the last line. | ||
ament_package() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<root> | ||
<tabbed_widget parent="main_window" name="Main Window"> | ||
<Tab tab_name="tab1" containers="1"> | ||
<Container> | ||
<DockSplitter count="1" sizes="1" orientation="-"> | ||
<DockArea name="..."> | ||
<plot mode="TimeSeries" flip_y="false" flip_x="false" style="Lines"> | ||
<range left="0.000000" top="1.000000" bottom="0.000000" right="1.000000"/> | ||
<limitY/> | ||
</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="1000"/> | ||
<boolean_strings_to_number value="true"/> | ||
<remove_suffix_from_strings value="true"/> | ||
<selected_topics value="/sensors/wheel_odom"/> | ||
</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="/trajectory/swerve_mpc_trajectory"/> | ||
</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

function TopicSplitter(inputstr)
 local t = {}
 for str in string.gmatch(inputstr, "[^/]+") do
 table.insert(t, str)
 end
 return t
end

function getDataFromSeriesName(name, time_sample)
 local data = {}
 local count = 0
 while(true) do
 local series_name = string.format("%s/%d", name, count)
 local series = TimeseriesView.find(series_name)
 
 if(series == nil) then
 break
 end
 
 table.insert(data, series:atTime(time_sample))
 count = count + 1
 end
 return data
end
"/> | ||
<scripts> | ||
<script function="series_names = GetSeriesNamesByPrefix("trajectory")
 
-- Adds new trajectories when received
for i, name in ipairs(series_names) do
 t = TopicSplitter(name)
 local group_name = t[2]
 local trajectory_name = t[3]
 
 -- If we haven't seen this trajectory group before, add table for group
 if(trajectory_groups[group_name] == nil) then
 trajectory_groups[group_name] = {}
 end
 -- If we haven't seen this trajectory within the group before, add series for it
 if(trajectory_groups[group_name][trajectory_name] == nil) then
 if(trajectory_name == "time")then
 trajectory_groups[group_name][trajectory_name] = true
 else 
 new_series_name = string.format("%s/%s", group_name, trajectory_name)
 print("Creating new trajectory category", new_series_name)
 trajectory_groups[group_name][trajectory_name] = ScatterXY.new(new_series_name)
 end
 end
end

-- Update existing trajectories --
for group_name, trajectory_map in pairs(trajectory_groups) do
 -- Abort for groups without a time vector
 if(trajectory_map["time"] == nil)then
 print("No Time series found! Cannot continue for group: ", group_name)
 break
 end
 -- Process time vector first
 time_str = string.format("/trajectory/%s/%s", group_name, "time")
 time_array = getDataFromSeriesName(time_str, tracker_time);
 
 for traj_name, data in pairs(trajectory_map) do
 local series = trajectory_groups[group_name][traj_name]
 if(traj_name ~= "time") then
 series:clear()
 local data_str = string.format("/trajectory/%s/%s", group_name, traj_name)
 local data_array = getDataFromSeriesName(data_str, tracker_time)
 
 for index, val in ipairs(data_array) do
 series:push_back(time_array[index], val)
 end
 end
 end
end
 " name="trajectory_plotter" global="trajectory_groups = {}
printed_already = false"/> | ||
</scripts> | ||
</plugin> | ||
<plugin ID="CSV Exporter"/> | ||
<plugin ID="ROS2 Topic Re-Publisher"/> | ||
</Plugins> | ||
<!-- - - - - - - - - - - - - - - --> | ||
<previouslyLoaded_Datafiles/> | ||
<!-- - - - - - - - - - - - - - - --> | ||
<customMathEquations/> | ||
<snippets/> | ||
<!-- - - - - - - - - - - - - - - --> | ||
</root> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import os | ||
from launch import LaunchDescription | ||
from launch_ros.actions import Node | ||
|
||
|
||
def generate_launch_description(): | ||
home_dir = os.path.expanduser("~") | ||
pkg_share_dir = os.path.join( | ||
home_dir, "VEXU_GHOST", "03_ROS", "ghost_viz" | ||
) | ||
|
||
# This contains all the parameters for our ROS nodes | ||
pt_config_path = os.path.join(pkg_share_dir, "config/plotjuggler_config.xml") | ||
|
||
|
||
plotjuggler_node = Node( | ||
package="plotjuggler", | ||
executable="plotjuggler", | ||
output="screen", | ||
arguments=["-n", "-l", pt_config_path] | ||
) | ||
|
||
return LaunchDescription([plotjuggler_node]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0"?> | ||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>ghost_viz</name> | ||
<version>1.0.0</version> | ||
<description>Provides tools for vizualization and plotting for GHOST projects</description> | ||
<maintainer email="[email protected]">maxx</maintainer> | ||
<license>MIT</license> | ||
|
||
<buildtool_depend>ament_cmake</buildtool_depend> | ||
|
||
<test_depend>ament_lint_auto</test_depend> | ||
<test_depend>ament_lint_common</test_depend> | ||
|
||
<exec_depend>plotjuggler</exec_depend> | ||
<exec_depend>plotjuggler_ros</exec_depend> | ||
|
||
<export> | ||
<build_type>ament_cmake</build_type> | ||
</export> | ||
</package> |
Submodule plotjuggler
added at
f3eabf
Submodule plotjuggler-ros-plugins
added at
e8a487
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.