Skip to content

Commit

Permalink
Merge develop into ROS2 (#697)
Browse files Browse the repository at this point in the history
* Documentation update (#668)

* docker docs update

* make build instructions ROS1

* updating install instructions, hopefully making them easier to follow

* updated from github PR reviews

* fix typo

* replace list with append (#671)

* ci: bump to checkout@v3 (#673)

* Unlatching topics (#674)

* Changed heartbeat topic to be unlatched.

* Changed echoed command to not latching.

* no subscribers and info is obtained by service, so no latched topic needed

* removing latched on frequently published topics

* Made command topic to not atching.

* no need for these to be latched

* sub and pub in same node, no need to latch

* no need to be latched no subs and not recorded, rviz should be opened when published

* Made ground bridge topics not latched.

* Fixed heartbeat topic latched comment.

---------

Co-authored-by: Katie Browne <[email protected]>

* support multiple versions for docs (#675)

* Make coverage_analyzer.py support Python 3 (#680)

Refactor to simplify and make output identical between Python 2 and 3

* Release 0.17.0 (#683)

* add missing glog flag that caused problems in some systems (#685)

* Make isort repeatable (#694)

* make isort repeatable

* isort now consistently groups astrobee imports as first party; one-time update to apply to old files

* moving ff_names to ff_common, updating headers (#696)

---------

Co-authored-by: Trey Smith <[email protected]>
Co-authored-by: Katie Browne <[email protected]>
  • Loading branch information
3 people committed Mar 9, 2023
1 parent a8ea703 commit d10e14f
Show file tree
Hide file tree
Showing 166 changed files with 816 additions and 435 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

Expand All @@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

Expand All @@ -44,7 +44,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Checkout submodule
run: git submodule update --init --depth 1 description/media
Expand All @@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Checkout submodule
run: git submodule update --init --depth 1 description/media
Expand All @@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Checkout submodule
run: git submodule update --init --depth 1 description/media
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Checkout submodule
run: git submodule update --init --depth 1 description/media
Expand All @@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Checkout submodule
run: git submodule update --init --depth 1 description/media
Expand All @@ -61,7 +61,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Checkout submodule
run: git submodule update --init --depth 1 description/media
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker_push_latest_base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Checkout submodule
run: git submodule update --init --depth 1 description/media
Expand All @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Checkout submodule
run: git submodule update --init --depth 1 description/media
Expand All @@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Checkout submodule
run: git submodule update --init --depth 1 description/media
Expand Down
88 changes: 69 additions & 19 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Build and Push Documentation to gh-pages Branch

on:
push:
branches: ['develop']
branches: ['develop', 'master', 'ros2']
workflow_dispatch:

jobs:
Expand All @@ -13,34 +13,84 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: repo/
- name: Checkout gh-pages
uses: actions/checkout@v2
with:
path: docs/
ref: gh-pages

- name: Build docker image with dependencies + build docs
run: docker build repo -f repo/scripts/docker/documentation.Dockerfile
-t astrobee:documentation

- name: Replace old documentation with new
- name: Checkout gh-pages
uses: actions/checkout@v3
with:
path: gh-pages/
ref: gh-pages

- name: Create/replace documentation for the current branch
run: |
(cd docs && git rm -r "*")
cp repo/doc/documentation.html docs/index.html
cp repo/doc/documentation.html docs/documentation.html
cp repo/doc/README.md docs/README.md
docker cp $(docker create --rm astrobee:documentation):/repo/doc/html docs/html
set -x
export BRANCH=$(cd repo && git branch --show-current)
# Make gh-pages checkout an orphan commit so we don't keep useless history.
(cd gh-pages && git checkout --orphan fresh)
# Install generated docs to a version folder based on branch name.
(cd gh-pages && git rm -rf --ignore-unmatch "v/$BRANCH")
mkdir -p gh-pages/v/
docker cp $(docker create --rm astrobee:documentation):/repo/doc/html "gh-pages/v/$BRANCH"
(cd gh-pages && git add --all "v/$BRANCH")
if [ "$BRANCH" == "develop" ]; then
# Update the few files at root level (mostly redirects)
(cd gh-pages && git rm -f --ignore-unmatch index.html documentation.html README.md 404.html .nojekyll)
cp repo/doc/documentation.html gh-pages/index.html
cp repo/doc/documentation.html gh-pages/documentation.html
cp repo/doc/README.md gh-pages/
cp repo/doc/404.html gh-pages/
touch gh-pages/.nojekyll
cp repo/doc/style/doc_version_select.js gh-pages/
(cd gh-pages && git add index.html documentation.html README.md 404.html .nojekyll doc_version_select.js)
# Set up HTML redirect to generated docs in the legacy path to
# avoid broken URL references
(cd gh-pages && git rm -rf --ignore-unmatch html)
python repo/doc/scripts/copy_html_link.py -v gh-pages/v/develop gh-pages/html
(cd gh-pages && git add --all html)
fi
# If the commit is tagged, copy generated docs to a version
# folder based on the tag. Copy rather than symlink so the tag
# folder will remain valid later when the branch folder is
# updated. Note: If you want to manually remove an obsolete docs
# version, use git to check out the gh-pages branch, remove the
# relevant folder, and push back to origin. Also, this action
# only triggers when the branch is pushed, and it detects only
# the tags that are present at that time. So you should either
# (1) push the branch and its tag in the same push call
# (easiest), or (2) manually trigger the CI workflow to run on
# the relevant branch again, after it has been tagged.
(cd repo && git fetch origin --tags)
for tag in $(cd repo && git tag --points-at HEAD | xargs echo); do
(cd gh-pages && git rm -rf --ignore-unmatch "v/$tag")
cp -r "gh-pages/v/$BRANCH" "gh-pages/v/$tag"
(cd gh-pages && git add --all "v/$tag")
done
# Auto-detect which docs versions are available. The script here
# has additional logic to ensure that develop, master, and ros2
# are at the beginning of the list if they are present.
all_versions=$(ls "gh-pages/v/" | sort | perl -e '@dirs = <STDIN>; chomp @dirs; %dirs_hash = map { $_ => 1 } @dirs; @head = grep { exists($dirs_hash{$_}) } ("develop", "master", "ros2"); %head_hash = map { $_ => 1 } @head; @tail = grep { !exists($head_hash{$_}) } @dirs; @versions = (@head, @tail); print "var allVersions = [\"", join("\", \"",@versions), "\"];\n";')
# Replace versions line specified in doc_version_select.js.
perl -i -ple "\$_ = '$all_versions' if /^var allVersions/;" gh-pages/doc_version_select.js
(cd gh-pages && git add doc_version_select.js)
- name: Commit and Push
run: |
cd docs
git add index.html documentation.html README.md
git add --all html/
EMAIL=`git show -s --format='%ae' HEAD`
NAME=`git show -s --format='%an' HEAD`
cd gh-pages
EMAIL=`git show -s --format='%ae' gh-pages`
NAME=`git show -s --format='%an' gh-pages`
git config user.email "$EMAIL"
git config user.name "$NAME"
{ git commit -m "Automatic update for $GITHUB_SHA." || true; }
git push origin gh-pages
git push -f origin HEAD:gh-pages
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Check repo for lint errors
run: ./scripts/git/cpplint_repo.py .

lint_check_python:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install linters
run: |
pip install click==8.0.1 black==22.1.0 isort==5.10.1
Expand Down
18 changes: 18 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[settings]

# The src_paths setting should be a comma-separated list of all the
# folders in the astrobee repo that contain *.py files. Python files
# found in these folders count as "first party" so they should be in a
# separate group from the "third party" imports. If src_paths is not
# specified, isort will treat only the files it's asked to check as
# first party. Therefore, if we specify src_paths broadly in this way,
# isort behavior should be more repeatable between (1) manually
# running isort on a single file in your local dev machine, vs. (2)
# running the git pre-commit hook locally on your dev machine, which
# historically ran isort only on the files that changed since the last
# commit, or (3) running the CI workflow, which always runs isort on
# all files. If src_paths needs to be updated, like if *.py files are
# added to a new folder, you can auto-update it by running
# scripts/git/configure_isort_paths.sh.

src_paths = doc/scripts,hardware/eps_driver/tools,hardware/pico_driver/scripts,hardware/pmc_actuator/tools,localization/localization_common,localization/localization_common/scripts/localization_common,localization/marker_tracking/tools/marker_tracking_node,localization/sparse_mapping/scripts,localization/sparse_mapping/tools,scripts/build,scripts/calibrate,scripts/debug,scripts/git,scripts/postprocessing/coverage_analysis,tools/bag_processing/scripts,tools/bag_processing/scripts/utilities,tools/bag_processing/test,tools/calibration/scripts,tools/gds_helper/src,tools/gnc_visualizer/dds,tools/gnc_visualizer/scripts,tools/gnc_visualizer/scripts/communications,tools/localization_analysis/scripts,tools/performance_tester/scripts
24 changes: 19 additions & 5 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,31 @@

Ubuntu 20.04 is the preferred host OS for most Astrobee developers to use.

Here are the available host OS options with development roadmap details:
- Ubuntu 20.04: This is the preferred host OS for most Astrobee developers to use. The Astrobee Facility team is currently preparing to upgrade the robots on ISS from Ubuntu 16.04 to Ubuntu 20.04, but we aren't yet ready to announce a deployment date for that upgrade.
- Ubuntu 18.04: We are not aware of any current robot users that still need Ubuntu 18.04 support, and expect to discontinue support in the near future. New users should not select this host OS.
- Ubuntu 16.04: The Astrobee robot hardware on ISS currently runs Ubuntu 16.04. Only developers with NASA internal access can cross-compile software to run on the robot, and must use 16.04 for that. Most developers shouldn't need to work with 16.04, especially when just getting started. Support will eventually be discontinued after the robot hardware on ISS is upgraded to Ubuntu 20.04.
Here are the available host OS options with development roadmap details (use 64-bit PC (AMD64) desktop image):
- [Ubuntu 20.04](http://releases.ubuntu.com/20.04): This is the preferred host OS for most Astrobee developers to use. The Astrobee Facility team is currently preparing to upgrade the robots on ISS from Ubuntu 16.04 to Ubuntu 20.04, but we aren't yet ready to announce a deployment date for that upgrade.
- [Ubuntu 18.04](http://releases.ubuntu.com/18.04): We are not aware of any current robot users that still need Ubuntu 18.04 support, and expect to discontinue support in the near future. New users should not select this host OS.
- [Ubuntu 16.04](http://releases.ubuntu.com/16.04): The Astrobee robot hardware on ISS currently runs Ubuntu 16.04. Only developers with NASA internal access can cross-compile software to run on the robot, and must use 16.04 for that. Most developers shouldn't need to work with 16.04, especially when just getting started. Support will eventually be discontinued after the robot hardware on ISS is upgraded to Ubuntu 20.04.
(Ubuntu 22.04 not supported)

Graphical interfaces will perform best if your host OS is running natively (not in a virtual machine).

Your host OS must have an X11 server installed if you want to use graphical applications, even if you are developing inside a Docker container (the X11 application running inside the container will forward its interface to the host's X11 server). X11 comes with Ubuntu Desktop by default.

If you plan to develop inside Docker, see [this page on using ROS with Docker](http://wiki.ros.org/docker/Tutorials#Tooling_with_Docker) for more details.

For users installing Astrobee on a Virtual Machine with the intent on running simulations:
VMWare and VirtualBox have been both tested to work well; Allocate an appropriate amount of RAM, number
of processors and video memory given your total computer capabilities; If graphics acceleration is
available on the settings, turn it on.
For reference (not required), an example of a setup capable of running the
simulation smoothly has 8GB RAM, 4 Processors and 128MB Video memory.

*Note: You will need 4 GBs of RAM to compile the software. If you don't have
that much RAM available, please use swap space.*

*Note: Please ensure you install the 64-bit PC (AMD64) version of Ubuntu (desktop for simulation and
development). We do not support running Astrobee Robot Software on 32-bit systems.*

## Option 1: Install inside a Docker container

1. Make sure you have Docker installed in your system by following:
Expand All @@ -39,7 +53,7 @@ There is also experimental support for using the Visual Studio Code Dev Containe

For much more discussion, see: \subpage install-docker.

## Option 2: Install in your native OS
## Option 2: Install in your native OS / Virtual Machine

The native installation instructions below walk you through manually running the same steps that are fully automated in a Docker installation.

Expand Down
5 changes: 5 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Releases

# Release 0.17.0

* Full compatibility and debians built for Ubuntu 20
* Deleted all simulink autocode for ctl and fam

## Release 0.16.7

* Remove simulink auto-generated code
Expand Down
4 changes: 2 additions & 2 deletions astrobee.doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ PROJECT_NAME = "NASA Astrobee Robot Software"
# control system is used.


PROJECT_NUMBER = 0.16.7
PROJECT_NUMBER = 0.17.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short.

PROJECT_BRIEF = "Flight software for the Astrobee robot operating inside the International Space Station."
PROJECT_BRIEF = "Flight software for the Astrobee robots operating inside the International Space Station."

# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
# in the documentation. The maximum height of the logo should not exceed 55
Expand Down
2 changes: 1 addition & 1 deletion astrobee/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
cmake_minimum_required(VERSION 3.5)
project(astrobee)

set(ASTROBEE_VERSION 0.16.7)
set(ASTROBEE_VERSION 0.17.0)

## Compile as C++14, supported in ROS Kinetic and newer
add_compile_options(-std=c++14)
Expand Down
2 changes: 1 addition & 1 deletion behaviors/arm/src/arm_nodelet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ class ArmNodelet : public ff_util::FreeFlyerNodelet {
sub_joint_states_ = nh->subscribe(TOPIC_JOINT_STATES, 1,
&ArmNodelet::JointStateCallback, this);
pub_joint_goals_ = nh->advertise<sensor_msgs::JointState>(
TOPIC_JOINT_GOALS, 1, true);
TOPIC_JOINT_GOALS, 1);

// Subscribe to Proximal Joint Servo Enabling service
client_enable_prox_servo_ = nh->serviceClient<ff_hw_msgs::SetEnabled>(
Expand Down
2 changes: 1 addition & 1 deletion behaviors/arm/tools/arm_tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
// Include RPOS
#include <ros/ros.h>
// FSW includes
#include <ff_util/ff_names.h>
#include <ff_common/ff_names.h>
#include <ff_util/ff_action.h>
#include <ff_util/config_client.h>

Expand Down
2 changes: 1 addition & 1 deletion behaviors/dock/tools/dock_tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <ros/ros.h>

// FSW includes
#include <ff_util/ff_names.h>
#include <ff_common/ff_names.h>
#include <ff_util/ff_action.h>

// Action
Expand Down
1 change: 0 additions & 1 deletion behaviors/light_flow/include/light_flow.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ namespace ff_hw_msgs {
typedef ff_hw_msgs::msg::ConfigureLED ConfigureLED;
typedef ff_hw_msgs::msg::ConfigureLEDGroup ConfigureLEDGroup;
} // namespace ff_hw_msgs

#include <ff_common/ff_names.h>
#include <jsoncpp/json/value.h>
#include <rclcpp/rclcpp.hpp>
Expand Down
1 change: 0 additions & 1 deletion behaviors/light_flow/src/light_flow/light_flow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include "../../include/light_flow.h"
#include <assert.h>

#include <ff_common/ff_names.h>
#include <jsoncpp/json/allocator.h>
#include <jsoncpp/json/json.h>
Expand Down
2 changes: 1 addition & 1 deletion behaviors/perch/tools/perch_tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <ros/ros.h>

// FSW includes
#include <ff_util/ff_names.h>
#include <ff_common/ff_names.h>
#include <ff_util/ff_action.h>

// Action
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

#include "ff_msgs/ResponseOnly.h"

#include "ff_util/ff_names.h"
#include "ff_common/ff_names.h"
#include "ff_util/ff_nodelet.h"

// SoraCore Includes
Expand Down
Loading

0 comments on commit d10e14f

Please sign in to comment.