Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fetch_binary_drivers] new [fetch_drivers] package #27

Merged
merged 11 commits into from
Feb 13, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
build
*.tar.gz
*.so

# system config
*.deb
*.debhelper
*.substvars
*.log
*.dsc
*.changes
fetch-melodic-config
freight-melodic-config
files
erelson marked this conversation as resolved.
Show resolved Hide resolved
82 changes: 82 additions & 0 deletions fetch_binary_drivers/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
cmake_minimum_required(VERSION 3.5)
project(fetch_drivers)

###
#
# This is the public version of fetch_drivers.
#
# This is a binary only release of our dirvers and firmware.
# The drivers and firmware have been compiled for our research robots, inside of Docker containers on our TeamCity build servers.
#
# The resulting output of that build job a tar.gz, where the build job should only copy in what is required for the research robots.
# This public repository, just pulls in that tar.gz and extracts installs it into ROS/catkin paths.
##

find_package(catkin REQUIRED
COMPONENTS
mk
)

## System dependencies are found with CMake's conventions
find_package(Boost REQUIRED
COMPONENTS
filesystem
program_options
python
thread
system
)

add_custom_target(
binary_driver ALL
COMMAND cmake -E chdir ${PROJECT_SOURCE_DIR} $(MAKE) -f Makefile.tarball
COMMAND cmake -E make_directory ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_LIB_DESTINATION}/${PROJECT_NAME}
COMMAND cmake -E copy_if_different ${PROJECT_SOURCE_DIR}/build/output/lib/libfetch_drivers.so ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_LIB_DESTINATION}/libfetch_drivers.so
COMMAND cmake -E copy_if_different ${PROJECT_SOURCE_DIR}/build/output/lib/libfetch_drivers_odva.so ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_LIB_DESTINATION}/libfetch_drivers_odva.so
COMMAND cmake -E copy ${PROJECT_SOURCE_DIR}/build/output/lib/${PROJECT_NAME}/* ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_LIB_DESTINATION}/${PROJECT_NAME}/
COMMAND cmake -E make_directory ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_SHARE_DESTINATION}/${PROJECT_NAME}
COMMAND cmake -E copy_if_different ${PROJECT_SOURCE_DIR}/build/output/share/${PROJECT_NAME}/firmware.tar.gz ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_SHARE_DESTINATION}/${PROJECT_NAME}/
)

###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if your package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES fetch_binary_drivers
# CATKIN_DEPENDS other_catkin_pkg
moriarty marked this conversation as resolved.
Show resolved Hide resolved
# DEPENDS system_lib
moriarty marked this conversation as resolved.
Show resolved Hide resolved
)

###########
## Build ##
###########

#############
## Install ##
#############

install(
FILES build/output/lib/libfetch_drivers.so build/output/lib/libfetch_drivers_odva.so
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)

install(
DIRECTORY build/output/lib/fetch_drivers
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
PATTERN "build/output/lib/fetch_drivers/*"
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ
WORLD_EXECUTE WORLD_READ
)

install(
FILES build/output/share/${PROJECT_NAME}/firmware.tar.gz build/output/share/${PROJECT_NAME}/laser_filters.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
19 changes: 19 additions & 0 deletions fetch_binary_drivers/Makefile.tarball
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
all: binary_driver
Copy link
Contributor

Choose a reason for hiding this comment

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

Why non-standard name?


# TODO: There are some more things to automate.
Copy link
Contributor

Choose a reason for hiding this comment

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

More specific?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are too many to list. I had several TODOs and I just combined them into one generic one.
I see your comments also say Why not use DRIVER_VERSION and that's basically when I rolled back and just used the hardcoded path for now.
But it goes into the comments on another comment were we'll need to setup more build/test automation.

For now we're just pulling DRIVER_VERSION = 0.8.0 and until we have a more automated pipeline we'll leave it at this version and just be sure to rebuild that version of our drivers against the latest melodic especially at the time of a sync.

DRIVER_VERSION = 0.8.0
TARBALL = build/fetch-drivers-0.8.0.tar.gz
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use DRIVER_VERSION

TARBALL_URL = http://packages.fetchrobotics.com/binaries/fetch-drivers-0.8.0.tar.gz
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto as above

SOURCE_DIR = build/output
MD5SUM_FILE = fetch-drivers-0.8.0.tar.gz.md5sum
UNPACK_CMD = tar zxvf
include $(shell rospack find mk)/download_unpack_build.mk

binary_driver: $(SOURCE_DIR)/unpacked
echo "binary driver built in: " $(SOURCE_DIR)

clean:
-rm -rf $(SOURCE_DIR)

wipe: clean
-rm -rf build
43 changes: 43 additions & 0 deletions fetch_binary_drivers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Fetch Binary Drivers

This is a public binary version of our drivers and firmware for the Fetch Research Platforms.

https://fetchrobotics.com/robotics-platforms/
Copy link
Contributor

Choose a reason for hiding this comment

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

Link

Copy link
Collaborator

Choose a reason for hiding this comment

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

Markdown will render these fine. Is this a style preference?


We have two Fetch Research Platforms. Commonly known as Fetch and Freight. Fetch is the one with the arm.
The drivers and firmware in this package are for both.

https://docs.fetchrobotics.com/
Copy link
Contributor

Choose a reason for hiding this comment

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

Link


# Fetch Drivers

The catkin package inside of this folder is called `fetch_drivers`, not `fetch_binary_drivers`.
This is because we've previously been releasing packages which depend on `fetch_drivers`.
We're just changing how we distribute our drivers.

# About

This package should only be needed if you're using one of the Fetch Research Platforms.

Our goal is to better support our our Fetch Research Platform customers through an improved, more automated build and release process. This will get enable us to get updates out faster.

We discussed at [ROSCon 2018](https://roscon.ros.org/2018/) in a talk "Hermetic Robot Deployment Using Multi-Stage Dockers"
by @levavakian & @bluryi some of our internal way of doing build/test/deployment using Docker:
[Video](https://vimeo.com/293626218),
[Slides](https://roscon.ros.org/2018/presentations/ROSCon2018_multistage_docker_for_robot_deployment.pdf).

This public repository, is designed to consume the output of our private `fetch_drivers` repository and enable
Fetch Research Platform users access to the drivers/firmware faster via the official ros packages.

To create the output of our private package, we have a special build job which runs inside of a docker container to ensure we don't accidentally
pull in any private dependencies, and also doesn't output any of the additional commercial robot drivers.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to tell them this?


Previously, we built our drivers on a private buildbot, and hosted them on our own packages site.
We also had a manually synced mirror of the ros packages. This allowed us to ensure we tested the versions of dependancies which were on our mirror.
The old process was not as automated as we would like.

We're in the process of testing melodic, and setting up our hosted stable mirror, and documenting the upgrade process to ensure Fetch Research Platform customers have a smooth transition.

We will announce to our customers when we're officially ready and supporting melodic.
Copy link
Contributor

Choose a reason for hiding this comment

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

ROS Melodic


See https://docs.fetchrobotics.com for more information.
Copy link
Contributor

Choose a reason for hiding this comment

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

Link here

1 change: 1 addition & 0 deletions fetch_binary_drivers/fetch-drivers-0.8.0.tar.gz.md5sum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1d283854b2406e1945319a57e660c5ec /tmp/fetch-drivers-0.8.0.tar.gz
47 changes: 47 additions & 0 deletions fetch_binary_drivers/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0"?>
<package format="2">
<name>fetch_drivers</name>
<version>0.0.0</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we not syncing version numbers with the drivers themselves?

<description>
The public fetch_drivers package is a binary only release.

fetch_drivers contains both the drivers and firmware for the fetch and freight research robots.
There should be no reason to use these drivers unless you're running on a fetch or a frieght research robot.
erelson marked this conversation as resolved.
Show resolved Hide resolved
This package, is a cmake/make only package which installs the binaries for the drivers and firmware.
</description>

<!-- One maintainer tag required, multiple allowed, one person per tag -->
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these comments intentionally left in

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They're just left over from the catkin generate package command. I think it was just reminding me to add the maintainers.

<maintainer email="[email protected]">Alexander Moriarty</maintainer>
<maintainer email="[email protected]">FetchRobotics Open Source Team</maintainer>
Copy link
Contributor

Choose a reason for hiding this comment

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

Fetch Robotics


<!-- One license tag required, multiple allowed, one license per tag -->
<license>Proprietary</license>


<!-- Url tags are optional, but multiple are allowed, one per tag -->
<url type="website">http://wiki.ros.org/fetch_drivers</url>
Copy link
Contributor

Choose a reason for hiding this comment

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

https://wiki.ros.org/fetch_drivers for extra security

<url type="docs">https://docs.fetchrobotics.com</url>
<url type="info">https://fetchrobotics.com/robotics-platforms/</url>


<!-- Author tags are optional, multiple are allowed, one per tag -->
<author email="[email protected]">Alexander Moriarty</author>


<buildtool_depend>catkin</buildtool_depend>
<build_depend>mk</build_depend>
<exec_depend>actionlib</exec_depend>
<exec_depend>boost</exec_depend>
<exec_depend>robot_controllers</exec_depend>
<exec_depend>robot_controllers_interface</exec_depend>
<exec_depend>rosconsole</exec_depend>
<exec_depend>roscpp_serialization</exec_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rostime</exec_depend>
<exec_depend>urdf</exec_depend>

<!-- The export tag contains other, unspecified, tags -->
<export>
<!-- Other tools can request additional information be placed here -->
</export>
</package>
22 changes: 22 additions & 0 deletions fetch_system_config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Fetch System Config

This is the Git Build Package (GBP) repo for Research versions of Fetch/Freight.
All other tools (iso installer, documentation, etc), and the commercial version
of this package, are on the 'master' branch.

# How to Manually Build

```bash
git clone [email protected]:fetchrobotics/fetch_ros.git # -b melodic-devel
cd fetch_ros/fetch_system_config
dpkg-buildpackage -us -uc
# Debians are placed in the parent directory
cd ..
ls *system*.deb
```

# TODO: catkin/standardize

This isn't a GBP anymore, it will be published to:

https://github.com/fetchrobotics-gbp/fetch_robots-release
5 changes: 5 additions & 0 deletions fetch_system_config/debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
fetch-system-config (0.1-0) bionic; urgency=medium

* initial release of melodic packages

-- Eric Relson <[email protected]> Fri, 01 Feb 2019 10:50:25 -0800
1 change: 1 addition & 0 deletions fetch_system_config/debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
Copy link
Contributor

Choose a reason for hiding this comment

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

You probably want 11?

Package: debhelper (9.20131227ubuntu1)

even for 14.04

Copy link
Collaborator

Choose a reason for hiding this comment

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

My 14.04 desktop (still on 3.x kernel... nice and safe...) has 9.x debhelper installed. I don't think there's a reason to bump this requirement presently. And it sounds like the plan is we'll move to using bloom for this later anyways.

38 changes: 38 additions & 0 deletions fetch_system_config/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Source: fetch-system-config
Section: main
Priority: optional
Maintainer: Eric Relson <[email protected]>
Build-Depends: debhelper (>= 9.0.0),
dh-systemd (>= 1.5)
Standards-Version: 3.9.4
Homepage: www.fetchrobotics.com

Package: fetch-melodic-config
Architecture: any
Depends: ${misc:Depends},
adduser,
chrony,
openssh-server,
ros-melodic-ros
Description: Configuration for Fetch on Melodic
This package will start ROS Melodic at bootup
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this mean?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Very brief vague statement, but nominally accurate. It installs roscore + robot systemd units which run at computer power-on. I'll reword this probably.

Conflicts: fetch-indigo-config,
fetch-system-config,
freight-indigo-config,
freight-melodic-config,
freight-system-config

Package: freight-melodic-config
Architecture: any
Depends: ${misc:Depends},
adduser,
chrony,
openssh-server,
ros-melodic-ros
Description: Configuration for Freight on Melodic
This package will start ROS Melodic at bootup
Conflicts: fetch-indigo-config,
fetch-melodic-config,
fetch-system-config,
freight-system-config,
freight-indigo-config
36 changes: 36 additions & 0 deletions fetch_system_config/debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/

Files: *
Copyright: 2015-2018 Fetch Robotics Inc <[email protected]>
2013 I Heart Engineering <[email protected]>
License: BSD-3-clause
Copyright (c) 2015-2018, Fetch Robotics Inc.
Copyright (c) 2013, I Heart Engineering
All rights reserved.
.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
.
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of the I Heart Engineering nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
1 change: 1 addition & 0 deletions fetch_system_config/debian/docs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
README.md
1 change: 1 addition & 0 deletions fetch_system_config/debian/fetch-melodic-config.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
root/* .
Loading