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

Removing duplicated code of launch #29

Merged
merged 2 commits into from
Apr 15, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Dockerfile
.dockerignore
.gitignore
.github

*.md
30 changes: 15 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ ARG DISTRO
RUN apt update && sudo apt install -y \
build-essential \
cmake \
git \
python3-colcon-common-extensions \
python3-pip \
python3-vcstool \
wget \
emacs-nox \
ros-${DISTRO}-rmw-cyclonedds-cpp \
unzip \
wireguard \
iproute2 \
Expand All @@ -21,7 +19,6 @@ RUN apt update && sudo apt install -y \

RUN rm -rf /var/lib/apt/lists/*


# install some pip packages needed for testing
RUN python3 -m pip install --no-cache-dir -U \
argcomplete \
Expand All @@ -38,25 +35,28 @@ RUN python3 -m pip install --no-cache-dir -U \
pytest-rerunfailures \
pytest \
pytest-cov \
pytest-runner \
setuptools \
opencv-python
pytest-runner

RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
# RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip"

RUN unzip awscliv2.zip && rm awscliv2.zip
RUN ./aws/install
RUN pip3 install boto3 paramiko scp wgconfig
RUN python3 -m pip install --no-cache-dir -U boto3 paramiko scp wgconfig

# Create FogROS2 worspace and build it
RUN mkdir -p /home/root/fog_ws/src
WORKDIR /home/root/fog_ws/src
COPY . /home/root/fog_ws/src/fogros2
COPY ./fogros2/configs/cyclonedds.xml /home/root/fog_ws
ENV ROS_WS=/home/root/fog_ws
RUN mkdir -p ${ROS_WS}/src
WORKDIR ${ROS_WS}/src
COPY . ${ROS_WS}/src/

WORKDIR /home/root/fog_ws
RUN . /opt/ros/$DISTRO/setup.sh && \
WORKDIR ${ROS_WS}
RUN . /opt/ros/${DISTRO}/setup.sh && \
colcon build --merge-install --cmake-clean-cache

# setup entrypoint
ENV ROS_DISTRO=${DISTRO}
COPY ./ros_entrypoint.sh /
RUN chmod +x /ros_entrypoint.sh

ENTRYPOINT [ "/ros_entrypoint.sh" ]
CMD ["bash"]
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,7 @@ TODO: replace this with fogros2 tooling that's cloud-agnostic. E.g. `ros2 fog co
docker run -it --rm --net=host --cap-add=NET_ADMIN fogros2
# configure cloud provider CLI wrappers (e.g. AWS)
aws configure
# configure environment
source install/setup.bash # source fogros2 workspace as an overlay
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp # work with CycloneDDS DDS implementation
export CYCLONEDDS_URI=file://$(pwd)/install/share/fogros2/configs/cyclonedds.xml
# launch talker node on the cloud
ros2 launch fogros2_examples talker.launch.py
```

Expand Down
1 change: 1 addition & 0 deletions fogros2/fogros2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
from .aws import *
from .cloud_node import CloudNode
from .vpn import VPN
from .fogros_launch_description import *
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@

import launch.logging

from .action import Action
from .actions import DeclareLaunchArgument
from .launch_context import LaunchContext
from .launch_description_entity import LaunchDescriptionEntity
from launch.action import Action
from launch.actions import DeclareLaunchArgument
from launch.launch_context import LaunchContext
from launch.launch_description_entity import LaunchDescriptionEntity

if TYPE_CHECKING:
from .actions.include_launch_description import IncludeLaunchDescription # noqa: F401

import os
import pickle
import socket
from collections import defaultdict
from threading import Thread
from time import sleep
Expand Down
3 changes: 1 addition & 2 deletions fogros2_examples/launch/gqcnn_docker.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from launch import FogROSLaunchDescription
from fogros2 import FogROSLaunchDescription
from launch_ros.actions import Node

import fogros2
Expand Down
2 changes: 1 addition & 1 deletion fogros2_examples/launch/talker.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from launch import FogROSLaunchDescription
from fogros2 import FogROSLaunchDescription
from launch_ros.actions import Node

import fogros2
Expand Down
2 changes: 1 addition & 1 deletion fogros2_examples/launch/vslam.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from launch import FogROSLaunchDescription
from fogros2 import FogROSLaunchDescription
from launch_ros.actions import Node

import fogros2
Expand Down
2 changes: 1 addition & 1 deletion fogros2_examples/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>fogros2_examples</name>
<version>0.0.0</version>
<version>0.0.1</version>
<description>Examples using FogROS2</description>
<author email="[email protected]">Kaiyuan (Eric) Chen</author>
<author email="[email protected]">Víctor Mayoral-Vilches</author>
Expand Down
6 changes: 3 additions & 3 deletions fogros2_examples/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

setup(
name=package_name,
version="0.0.0",
version="0.0.1",
packages=[package_name],
data_files=[
("share/ament_index/resource_index/packages", ["resource/" + package_name]),
("share/" + package_name, ["package.xml"]),
("share/ament_index/resource_index/packages", [os.path.join("resource", package_name)]),
(os.path.join("share", package_name), ["package.xml"]),
(os.path.join("share", package_name), glob("launch/*.launch.py")),
],
install_requires=["setuptools"],
Expand Down
6 changes: 0 additions & 6 deletions fogros2_launch/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions fogros2_launch/CHANGELOG.rst

This file was deleted.

27 changes: 0 additions & 27 deletions fogros2_launch/conftest.py

This file was deleted.

1 change: 0 additions & 1 deletion fogros2_launch/doc/.gitignore

This file was deleted.

20 changes: 0 additions & 20 deletions fogros2_launch/doc/Makefile

This file was deleted.

36 changes: 0 additions & 36 deletions fogros2_launch/doc/make.bat

This file was deleted.

Loading