Skip to content

Implement the mapping API - #8

Closed
glennswagner wants to merge 1 commit into
mainfrom
mapping_api
Closed

glennswagner wants to merge 1 commit into
mainfrom
mapping_api

Conversation

@glennswagner

Copy link
Copy Markdown
Contributor

Adds commands for
-getting hovermap status
-setting scan name prefix
-starting/stopping scans
-fetching the name of all completed scans
-downloading specified scan

Adds commands for
-getting hovermap status
-setting scan name prefix
-starting/stopping scans
-fetching the name of all completed scans
-downloading specified scan

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a ROS-facing “mapping API” layer that bridges ROS topics to the Hovermap’s HTTP endpoints, adds a dedicated message package for API status/scan metadata, and updates launch/docker/docs to support scan control and scan download workflows.

Changes:

  • Added http_interface_node to expose start/stop scan, scan prefix, scan listing, scan download, and status polling via ROS topics.
  • Introduced new hovermap_api_msgs message package for status and scan list payloads.
  • Updated launch, build/install, Docker, and README to wire up and document the new API topics and download directory mount.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/hovermap_api/scripts/http_interface_node New ROS node that calls Hovermap HTTP endpoints and publishes status/scan list/download outcomes.
src/hovermap_api/scripts/configure_perception One-shot publisher script for sending perception YAML configuration.
src/hovermap_api/package.xml Adds dependency on the new hovermap_api_msgs package.
src/hovermap_api/launch/api.launch Launches the new http_interface_node under the cortex namespace.
src/hovermap_api/CMakeLists.txt Adds hovermap_api_msgs dependency and installs the new Python node.
src/hovermap_api_msgs/package.xml New message package manifest.
src/hovermap_api_msgs/msg/ScanInformationList.msg New message for returning scan lists.
src/hovermap_api_msgs/msg/ScanInformation.msg New message for per-scan metadata.
src/hovermap_api_msgs/msg/HovermapStatus.msg New message for Hovermap status publication.
src/hovermap_api_msgs/CMakeLists.txt Message generation configuration for hovermap_api_msgs.
README.md Documents new topics and how scan download works in Docker.
docker/run_docker Adds optional host bind-mount for /data/downloads.
docker/Dockerfile Refactors pip install step to be cached via BuildKit bind-mount.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +6 to +7
import urllib.request
import urllib.error
Comment thread src/hovermap_api/scripts/http_interface_node
Comment on lines +159 to +161
except urllib.error.URLError as e:
rospy.logerr(f"Download failed for '{scan_name}': {e.reason}")
self._scan_download_successful_pub.publish(result_msg)
Comment on lines +163 to +164
def _on_set_scan_prefix(self, msg):
self._get(f"/setprefix?prefix={msg.data}")
Comment thread docker/run_docker
Comment on lines +29 to +39
EXTRA_MOUNTS=""
if [[ $# -ge 1 ]]; then
DOWNLOAD_DIR="$(realpath "$1")"
mkdir -p "$DOWNLOAD_DIR"
EXTRA_MOUNTS="--mount type=bind,src=$DOWNLOAD_DIR,dst=/data/downloads"
fi

docker run -it --rm --network=host \
--mount type=bind,src="$REPO_ROOT/src",dst=/ros_ws/src \
$EXTRA_MOUNTS \
"${IMAGE_NAME}"
Comment thread docker/Dockerfile
Comment thread README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants