Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Mock global path implementation #61

Merged
merged 56 commits into from
Jan 9, 2024
Merged

Conversation

SPDonaghy
Copy link
Contributor

@SPDonaghy SPDonaghy commented Nov 14, 2023

Description

Mock Global Path Node:

  • subscribes to GPS
  • accepts a global path parameter (List) which can be an actual path (list of waypoints) or a single element list (Destination)
  • publishes to global_path

Other Features:

  • Path interpolation function: This function analyzes the given path, including the starting position, and fills in any gaps (where waypoints are too far apart) with a subpath, using the same generate_path function
  • interval spacing function: a helper function for the interpolator, which returns an array of all the actual interval lengths for a given path
  • 3D plotting script
  • Purge script for deleting any generated path files in the global_paths directory
  • Instead of a service, in order to force the path to update, from the command line, you can just set the parameter force to true. The checks in the callback will be bypassed, the path updated, and then the param is set to false again.

Path Builder GUI Features:

  • Export to CSV
  • Clear
  • 3D Plot (which exports to a CSV in the process)

would like to add:

  • import paths from csv files
  • edit paths
  • join paths
  • travel time estimate
  • LatLon text fields for more precise point selection
  • maybe a stylesheet and logo

Verification

No verification at this time

Resources

@patrick-5546 patrick-5546 changed the title User/sp donaghy/mock global path 49 Mock global path implementation Nov 15, 2023
@patrick-5546 patrick-5546 force-pushed the user/SPDonaghy/mock-global-path-49 branch from ddfb8ac to 24735e8 Compare November 15, 2023 17:43
Copy link
Member

@patrick-5546 patrick-5546 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SPDonaghy updated the ROS infrastructure so that ros2 launch local_pathfinding main_launch.py launches your node. If you want to make any changes to the files outside of local_pathfinding/local_pathfinding, you will have to build local_pathfinding to apply them.

@SPDonaghy
Copy link
Contributor Author

@SPDonaghy updated the ROS infrastructure so that ros2 launch local_pathfinding main_launch.py launches your node. If you want to make any changes to the files outside of local_pathfinding/local_pathfinding, you will have to build local_pathfinding to apply them.

Okay, I made some changes in the latest commit to ensure that the mgp node runs upon launch. Seems to work as expected.

@patrick-5546
Copy link
Member

@hhenry01 any update on the remote transceiver endpoint?

@hhenry01
Copy link
Member

@hhenry01 any update on the remote transceiver endpoint?

Use http://localhost:8081/global-path

@patrick-5546
Copy link
Member

What should the format be? JSON?

Copy link
Member

@patrick-5546 patrick-5546 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great start

launch/main_launch.py Show resolved Hide resolved
launch/main_launch.py Show resolved Hide resolved
local_pathfinding/node_mock_global_path.py Outdated Show resolved Hide resolved
local_pathfinding/node_mock_global_path.py Outdated Show resolved Hide resolved
local_pathfinding/node_mock_global_path.py Show resolved Hide resolved
local_pathfinding/node_mock_global_path.py Outdated Show resolved Hide resolved
local_pathfinding/node_mock_global_path.py Outdated Show resolved Hide resolved
local_pathfinding/node_mock_global_path.py Outdated Show resolved Hide resolved
local_pathfinding/node_mock_global_path.py Outdated Show resolved Hide resolved
local_pathfinding/node_mock_global_path.py Show resolved Hide resolved
@patrick-5546 patrick-5546 removed the request for review from ubcsailbotsoftware November 30, 2023 08:03
@SPDonaghy
Copy link
Contributor Author

SPDonaghy commented Dec 14, 2023

@patrick-5546 I added some new features, it would be great to know your thoughts!

Major changes:

  • Path interpolation function: This function analyzes the given path, including the starting position, and fills in any gaps (where waypoints are too far apart) with a subpath, using the same generate_path function
  • interval spacing function: a helper function for the interpolator, which returns an array of all the actual interval lengths for a given path
  • Purge script for deleting any generated path files in the global_paths directory
  • Instead of a service, in order to force the path to update, from the command line, you can just set the parameter force to true. The checks in the callback will be bypassed, the path updated, and then the param is set to false again.

@SPDonaghy
Copy link
Contributor Author

More Changes:

Implemented a Path Builder GUI with Flask. Basic functions include:

  • Export to CSV
  • Clear Path
  • 3D Plot (which exports to a csv in the process)

I am a little behind on documentation for this stuff, so I'll be sure to catch up on that.
Also one persistent issue is I am not able to import plot_global_path.py (from the global_paths folder) in the path_builder.py module. Not sure why, so I have a workaround of pasting in the functions I needed, for now.

functions for
waypoint deletion
@FireBoyAJ24
Copy link
Contributor

All your test cases rot variables will need to be in ints to match the type set in the custom interfaces.

@SPDonaghy
Copy link
Contributor Author

SPDonaghy commented Dec 20, 2023

All your test cases rot variables will need to be in ints to match the type set in the custom interfaces.
@FireBoyAJ24

Were you still going to make a new pr for that? Or would you like me to?

Copy link
Member

@patrick-5546 patrick-5546 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WOW this is really great stuff Sean! Super impressed with path_builder and how you implemented my previous feedback

global_paths/path_builder/path_builder.py Outdated Show resolved Hide resolved
local_pathfinding/node_mock_global_path.py Outdated Show resolved Hide resolved
local_pathfinding/node_mock_global_path.py Outdated Show resolved Hide resolved
global_paths/plot_global_path.py Outdated Show resolved Hide resolved
local_pathfinding/node_mock_global_path.py Outdated Show resolved Hide resolved
local_pathfinding/node_mock_global_path.py Outdated Show resolved Hide resolved
launch/main_launch.py Show resolved Hide resolved
global_paths/plot_global_path.py Outdated Show resolved Hide resolved
global_paths/path_builder/path_builder.py Outdated Show resolved Hide resolved
global_paths/plot_global_path.py Outdated Show resolved Hide resolved
@patrick-5546 patrick-5546 force-pushed the user/SPDonaghy/mock-global-path-49 branch from 645bced to ef44874 Compare January 1, 2024 05:53
@SPDonaghy SPDonaghy merged commit 356a549 into main Jan 9, 2024
12 checks passed
@SPDonaghy SPDonaghy deleted the user/SPDonaghy/mock-global-path-49 branch January 9, 2024 18:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mock global path
4 participants