Skip to content

Commit

Permalink
Merge remote-tracking branch 'marina/comms_bridge' into comms_bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrowne15 committed Nov 21, 2023
2 parents fa6c92d + c168a41 commit 2e99efc
Show file tree
Hide file tree
Showing 27 changed files with 90 additions and 354 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/ci_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,6 @@ jobs:
run: ./scripts/docker/build.sh --xenial --remote
astrobee test_astrobee

build-bionic:

runs-on: ubuntu-20.04

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

- name: Checkout submodule
run: git submodule update --init --depth 1 description/media

- name: Build, test
run: ./scripts/docker/build.sh --bionic --remote
astrobee test_astrobee

build-focal:

runs-on: ubuntu-20.04
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/ci_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,42 +44,6 @@ jobs:
echo "$command";
eval "$command";
build-bionic:

runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3

- name: Checkout submodule
run: git submodule update --init --depth 1 description/media

- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin

- name: Build, test, push docker
run: >
revision="latest";
build_arg="astrobee";
push_arg="";
branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}};
if [ "${{ github.repository_owner }}" == "nasa" ]; then
if [ $branch == "develop" ]; then
push_arg="push_astrobee";
fi;
if [ $branch == "master" ]; then
export VERSION=`grep -w -m 1 "Release" RELEASE.md | awk '{print $3}'`;
revision="v${VERSION}";
build_arg="astrobee_base astrobee";
push_arg="push_astrobee_base push_astrobee";
fi;
fi;
command="./scripts/docker/build.sh --bionic --remote --revision ${revision} \
--owner ${{ github.repository_owner }} \
${build_arg} test_astrobee ${push_arg}";
echo "$command";
eval "$command";
build-focal:

runs-on: ubuntu-20.04
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/docker_push_latest_base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,6 @@ jobs:
--owner ${{ github.repository_owner }}
astrobee_base astrobee test_astrobee push_astrobee_base

build-bionic:

runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3

- name: Checkout submodule
run: git submodule update --init --depth 1 description/media

- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin

- name: Build base, build, test, push base docker
run: ./scripts/docker/build.sh --bionic
--owner ${{ github.repository_owner }}
astrobee_base astrobee test_astrobee push_astrobee_base

build-focal:

runs-on: ubuntu-20.04
Expand Down
6 changes: 4 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ 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 (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)

Specifically not supported:
- ~~[Ubuntu 18.04](http://releases.ubuntu.com/18.04)~~: Ubuntu 18.04 support as a software development platform was discontinued as of November 2023. (It was never supported on the robot hardware.)
- ~~[Ubuntu 22.04](http://releases.ubuntu.com/22.04)~~: There is currently no plan for Ubuntu 22.04 support on the Astrobee roadmap. However, note that Astrobee ROS2 support, when it eventually becomes available, is currently expected to use the ROS2 Humble Hawksbill distribution that normally runs on 22.04, but backported to run on 20.04 (the last Ubuntu version supported by ROS1). This will facilitate migrating from ROS1 to ROS2 without requiring a simultaneous Ubuntu distribution upgrade.

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

Expand Down
6 changes: 3 additions & 3 deletions astrobee/config/robots/honey.config
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ robot_geometry = {

robot_camera_calibrations = {
nav_cam = {
distortion_coeff = 0.99872,
distortion_coeff = 0.998757,
intrinsic_matrix = {
607.64218, 0.0, 624.85552,
0.0, 606.53899, 514.57737,
610.12594, 0.0, 628.35064,
0.0, 610.12594, 514.89592,
0.0, 0.0, 1.0
},
gain=100,
Expand Down
14 changes: 12 additions & 2 deletions astrobee/launch/sim.launch
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@
<arg name="dds" value="$(arg dds)" /> <!-- Enable DDS -->
<arg name="gtloc" value="$(arg gtloc)" /> <!-- Use Ground Truth Localizer -->
</include>

<!-- Default call initialize bias so config file is created if not already present -->
<node pkg="rosservice" type="rosservice" name="imu_calibration_default" args="call --wait $(arg ns)/gnc/ekf/init_bias" />
</group>

<!-- Auto-insert honey at a canned location -->
Expand All @@ -188,6 +191,9 @@
<arg name="dds" value="$(arg dds)" /> <!-- Enable DDS -->
<arg name="gtloc" value="$(arg gtloc)" /> <!-- Use Ground Truth Localizer -->
</include>

<!-- Default call initialize bias so config file is created if not already present -->
<node pkg="rosservice" type="rosservice" name="imu_calibration_honey" args="call --wait /honey/gnc/ekf/init_bias" />
</group>

<!-- Auto-insert bumble at a canned location -->
Expand All @@ -211,6 +217,9 @@
<arg name="dds" value="$(arg dds)" /> <!-- Enable DDS -->
<arg name="gtloc" value="$(arg gtloc)" /> <!-- Use Ground Truth Localizer -->
</include>

<!-- Default call initialize bias so config file is created if not already present -->
<node pkg="rosservice" type="rosservice" name="imu_calibration_bumble" args="call --wait /bumble/gnc/ekf/init_bias" />
</group>

<!-- Auto-insert queen at a canned location -->
Expand All @@ -234,9 +243,10 @@
<arg name="dds" value="$(arg dds)" /> <!-- Enable DDS -->
<arg name="gtloc" value="$(arg gtloc)" /> <!-- Use Ground Truth Localizer -->
</include>

<!-- Default call initialize bias so config file is created if not already present -->
<node pkg="rosservice" type="rosservice" name="imu_calibration_queen" args="call --wait /queen/gnc/ekf/init_bias" />
</group>

<!-- Default call initialize bias so config file is created if not already present -->
<node pkg="rosservice" type="rosservice" name="imu_calibration" args="call --wait /gnc/ekf/init_bias" />

</launch>
6 changes: 3 additions & 3 deletions description/description/urdf/model_carriage.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
<!-- ixx and iyy are dummy values -->
<inertia ixx="0.694860833" ixy="0.0" ixz="0.0" iyy="0.694860833" iyz="0.0" izz="0.0923"/>
</inertial>
<visual name="carriage_visual">
<visual>
<origin xyz="0 0 -0.02" rpy="0 0 0" />
<geometry>
<mesh filename="package://astrobee_freeflyer/meshes/carriage.dae"/>
</geometry>
</visual>
<collision name="carriage_collision">
<collision>
<origin xyz="0 0 -0.02" rpy="0 0 0" />
<geometry>
<mesh filename="package://astrobee_freeflyer/meshes/carriage.dae"/>
Expand All @@ -49,7 +49,7 @@
<child
link="${prefix}carriage" />
</joint>
<gazebo reference="carriage">
<gazebo reference="${prefix}carriage">
<kp>100000.0</kp>
<kd>100000.0</kd>
<mu1>0.0</mu1>
Expand Down
2 changes: 1 addition & 1 deletion doc/general_documentation/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ instead:

./src/scripts/configure.sh -l -F -D -p $INSTALL_PATH -w $WORKSPACE_PATH

*Note: If a workspace is specified but not an explicit install distectory,
*Note: If a workspace is specified but not an explicit install directory,
install location will be $WORKSPACE_PATH/install.*

*Note: Make sure you use the -F and -D flags. If these flags are not used, the
Expand Down
21 changes: 14 additions & 7 deletions doc/general_documentation/NASA_INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ your life greatly.
Verify that you are in this situation with the command below should succeed
(certificate will be added later; remove the Release.gpg file after being fetched).

wget -v --no-check-certificate http://astrobee.ndc.nasa.gov/software/dists/xenial/Release.gpg
wget -v --no-check-certificate https://astrobee.ndc.nasa.gov/software_new/dists/focal/Release.gpg

Before running the scripts in `scripts/setup` below, set this variable:

Expand Down Expand Up @@ -155,7 +155,7 @@ instead:

./scripts/configure.sh -l -p $INSTALL_PATH -w $WORKSPACE_PATH

*Note: If a workspace is specified but not an explicit install distectory,
*Note: If a workspace is specified but not an explicit install directory,
install location will be $WORKSPACE_PATH/install.*


Expand Down Expand Up @@ -183,7 +183,7 @@ For more information on running the simulator and moving the robot, please see t

## Cross-compile - Running the code on a real robot

In order to do this, you will need to followe the cross-compile build
In order to do this, you will need to follow the cross-compile build
instructions.

### Cross-compile setup
Expand All @@ -202,11 +202,18 @@ Next, download the cross toolchain and install the chroot:

mkdir -p $ARMHF_TOOLCHAIN
cd $HOME/arm_cross
$ASTROBEE_WS/src/submodules/platform/fetch_toolchain.sh
$ASTROBEE_WS/src/submodules/platform/rootfs/make_chroot.sh xenial dev $ARMHF_CHROOT_DIR

*Note: The last script shown above needs the packages `qemu-user-static` (not
`qemu-arm-static`) and `multistrap` to be installed (can be installed through apt).*
DIST=$(. /etc/os-release && echo $UBUNTU_CODENAME)
if [ ${DIST} == "kinetic" ]; then
# Use pre-built toolchain for 16.04
$ASTROBEE_WS/src/submodules/platform/fetch_toolchain.sh
else
# Use packaged toolchain for 20.04
sudo apt install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
fi
sudo apt install -y qemu-user-static multistrap

$ASTROBEE_WS/src/submodules/platform/rootfs/make_chroot.sh ${DIST} dev $ARMHF_CHROOT_DIR

### Cross-compile build

Expand Down
2 changes: 1 addition & 1 deletion doc/general_documentation/code_style.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
\page astrobee-code-style Astrobee code style

The Astrobee code uses [cpplint](https://en.wikipedia.org/wiki/Cpplint) to enforce a consistent and uniform coding style. Code which fails this tool cannot be committed with Git. It is suggested that the [clang-format-8](https://launchpad.net/ubuntu/bionic/+package/clang-format-8) program be installed on your machine. The *git commit* command will invoke this tool which will fix most (but not all) of the formatting errors using as a guide the ``.clang-format`` style file at the base of the Astrobee repository.
The Astrobee code uses [cpplint](https://en.wikipedia.org/wiki/Cpplint) to enforce a consistent and uniform coding style. Code which fails this tool cannot be committed with Git. It is suggested that the [clang-format-8](https://launchpad.net/ubuntu/focal/+package/clang-format-8) program be installed on your machine. The *git commit* command will invoke this tool which will fix most (but not all) of the formatting errors using as a guide the ``.clang-format`` style file at the base of the Astrobee repository.
4 changes: 2 additions & 2 deletions localization/camera/src/camera_model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ void CameraModel::SetTransform(const Eigen::Affine3d & cam_t_global) {

double CameraModel::GetFovX(void) const {
// This is an approximation since it doesn't take in account lens distortion
return atan(1.0 / (params_.GetFocalVector()[0] * params_.GetDistortedHalfSize()[0])) * 2;
return atan(params_.GetDistortedHalfSize()[0] / params_.GetFocalVector()[0] ) * 2;
}

double CameraModel::GetFovY(void) const {
// This is an approximation since it doesn't take in account lens distortion
return atan(1.0 / (params_.GetFocalVector()[1] * params_.GetDistortedHalfSize()[1])) * 2;
return atan(params_.GetDistortedHalfSize()[1] / params_.GetFocalVector()[1] ) * 2;
}

const camera::CameraParameters& CameraModel::GetParameters() const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import os
import subprocess

import pandas as pd


# Forward errors so we can recover failures
# even when running commands through multiprocessing
Expand Down Expand Up @@ -68,6 +66,9 @@ def create_directory(directory=None):


def load_dataframe(files):
# Importing the module only within this function
import pandas as pd

dataframes = [pd.read_csv(file) for file in files]
dataframe = pd.concat(dataframes)
return dataframe
Expand Down
2 changes: 1 addition & 1 deletion scripts/calibrate/intrinsics_calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def calibrate_camera(
return None

return (
bag_dir + "/camchain-" + bag_name + ".yaml"
bag_dir + "/" + bag_name + "-camchain.yaml"
) # The file where kalibr writes its output


Expand Down
45 changes: 5 additions & 40 deletions scripts/calibrate/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,17 @@ This folder contains various scripts for calibration.
- Build and install the Astrobee code on the robot.
- Install Kalibr on your computer.

## Installation instructions for Kalibr for Ubuntu 18.04
## Installation instructions for Kalibr for Ubuntu 20.04

sudo apt install python-rosinstall ipython python-software-properties \
python-git ipython python-catkin-tools
sudo apt install libopencv-dev ros-melodic-vision-opencv
Install Kalibr following the instructions at:

# Install pip and use it to install python packages
https://github.com/ethz-asl/kalibr

We assume that Python 2 is used.

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py
sudo -H pip install testresources
sudo -H pip install python-igraph==0.8 --upgrade
sudo -H pip install numpy==1.15.0 opencv-python==4.2.0.32

If necessary, pip and the other packages can be installed in user
space. The PYTHONPATH may need to be set for such packages.
The pip flags --user, --force, and --verbose may be useful.

Kalibr uses Python 2, and many packages are transitioning to Python 3,
so some effort may be needed to install the Python 2 dependencies.

# Build using catkin
export KALIBR_WS=$HOME/source/kalibr_workspace
mkdir -p $KALIBR_WS/src
cd $KALIBR_WS
source /opt/ros/melodic/setup.bash
catkin init
catkin config --extend /opt/ros/melodic
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release
cd $KALIBR_WS/src
git clone git@github.com:oleg-alexandrov/Kalibr.git

If the above cloning operation fails, it is likely due to some ssh settings on your machine not being as GitHub expects. Then try:
However, check out our fork which supports the assymetric aprilgrid
installed on Astrobee's dock:

git clone https://github.com/oleg-alexandrov/Kalibr.git

In either case, continue as follows:

# This line takes care of catkin not finding numpy.
ln -s /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy \
$KALIBR_WS/src/Kalibr/Schweizer-Messer/numpy_eigen/include

catkin build -DCMAKE_BUILD_TYPE=Release -j4

# Prepare the environment. This is expected for all the steps below.

Run, for example:
Expand Down
2 changes: 0 additions & 2 deletions scripts/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,6 @@ ff_path=`canonicalize ${rootpath}`
DIST=`cat /etc/os-release | grep -oP "(?<=VERSION_CODENAME=).*"`
if [ "$DIST" = "xenial" ]; then
ros_version=kinetic
elif [ "$DIST" = "bionic" ]; then
ros_version=melodic
elif [ "$DIST" = "focal" ]; then
ros_version=noetic
fi
Expand Down
Loading

0 comments on commit 2e99efc

Please sign in to comment.