Skip to content

Commit

Permalink
Fixing Slight Formatting issues
Browse files Browse the repository at this point in the history
Signed-off-by: CursedRock17 <[email protected]>
  • Loading branch information
CursedRock17 committed Sep 23, 2024
1 parent a5bca87 commit f26a180
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
18 changes: 9 additions & 9 deletions source/Getting-Started/Docker-Images.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@ The Space ROS Docker Images

There are multiple ways to acquire docker images within the Space ROS ecosystem.

As a prerequisite ensure that docker is `installed <https://docs.docker.com/desktop/>`_.
As a prerequisite ensure that docker is `installed <https://docs.docker.com/desktop/>`__.

1. Docker Hub
-------------

Docker Hub is a collection of various groups and images within the Docker ecosystem.
Space ROS has it's own `collection of images <https://hub.docker.com/r/osrf/space-ros/tags/>`_
Space ROS has it's own `collection of images <https://hub.docker.com/r/osrf/space-ros/tags/>`__
To install a version of Space ROS simply:

```
docker pull osrf/space-ros:{tag}
```
.. code-block:: console
docker pull osrf/space-ros:{tag}
Then run the image with:

```
docker run --rm -it --name osrf_space-ros --network host \
-e DISPLAY -e TERM -e QT_X11_NO_MITSHM=1 osrf/space-ros:{tag}`
```
.. code-block:: console
docker run --rm -it --name osrf_space-ros --network host \
-e DISPLAY -e TERM -e QT_X11_NO_MITSHM=1 osrf/space-ros:{tag}`
You can install other packages like `moveit2 <https://hub.docker.com/r/moveit/moveit2/tags/>`_ and `navigation2 <https://hub.docker.com/r/rosplanning/navigation2/tags/>`_ with their packages on Docker Hub, using the same commands, just replacing them with the correct organization and image names.

2 changes: 1 addition & 1 deletion source/How-To-Guides/Use-Custom-Allocator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This guide breaks down a demo using a custom C++ memory allocator within the Spa

Introduction
------------
Within the Demos section of the Space ROS ecosystem there is an `example <https://github.com/space-ros/demos/tree/main/space_ros_memory_allocation_demo/>`__ of using C++17 style allocators with Space ROS.
Within the Demos section of the Space ROS ecosystem there is an `example <https://github.com/space-ros/demos/tree/main/space_ros_memory_allocation_demo/>`__of using C++17 style allocators with Space ROS.
During the release of C++17, developers of the C++ STL felt it would be important to increase one's ability to allocate memory dynamically opposed to strictly staticly. Thus they created the `polymorphic_allocator <https://en.cppreference.com/w/cpp/memory/polymorphic_allocator/>`__which had different allocation behavior. We are able to use various customizable allocation methods within a common type.

Running the Demo
Expand Down
20 changes: 20 additions & 0 deletions source/Tutorials/Run-On-RTEMS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Build
To simplify collecting and compiling dependencies on a wide range of systems, we have created a Docker container that contains everything.

.. code-block:: console
cd /path/to/zynq_rtems
./build_dependencies.sh
Expand All @@ -37,6 +38,7 @@ This will typically take at least 10 minutes, and can take much longer if either
Next, we will use this "container full of dependencies" to compile a sample application.

.. code-block:: console
cd /path/to/zynq_rtems
./compile_demos.sh
Expand All @@ -49,35 +51,48 @@ Run
The emulated system that will run inside QEMU needs to have a way to talk to a virtual network segment on the host machine.
We'll create a TAP device for this.
The following script will set this up, creating a virtual `10.0.42.x` subnet for a device named `tap0`:

.. code-block:: console
./start_network_tap.sh
We will need three terminals for this demo:
* Zenoh router
* Zenoh subscriber
* Zenoh-Pico publisher (in RTEMS in QEMU)

First, we will start a Zenoh router:

.. code-block:: console
cd /path/to/zynq_rtems
cd hello_zenoh
./run_zenoh_router
This will print a bunch of startup information and then continue running silently, waiting for inbound Zenoh traffic. Leave this terminal running.

In the second terminal, we'll run the Zenoh subscriber example:

.. code-block:: console
cd /path/to/zynq_rtems
cd hello_zenoh
./run_zenoh_subscriber
In the third terminal, we will run the RTEMS-based application, which will communicate with the Zenoh router and thence to the Zenoh subscriber.
The following script will run QEMU inside the container, with a volume-mount of the `hello_zenoh` demo application so that the build products from the previous step are made available to the QEMU that was built inside the container.

.. code-block:: console
cd /path/to/zynq_rtems
cd hello_zenoh
./run_rtems.sh
The terminal should print a bunch of information about the various emulated Zynq network interfaces and their routing information.
After that, it should contact the `zenohd` instance running in the other terminal. It should print something like this:

.. code-block:: console
Opening zenoh session...
Zenoh session opened.
Own ID: 0000000000000000F45E7E462568C23B
Expand All @@ -98,9 +113,11 @@ After that, it should contact the `zenohd` instance running in the other termina
publishing: Hello, world! 9
Closing zenoh session...
Done. Goodbye.
The second terminal, running a Zenoh example subscriber, should print something like this:

.. code-block:: console
Declaring Subscriber on 'example'...
[2022-12-06T21:41:11Z DEBUG zenoh::net::routing::resource] Register resource example
[2022-12-06T21:41:11Z DEBUG zenoh::net::routing::pubsub] Register client subscription
Expand All @@ -117,6 +134,7 @@ The second terminal, running a Zenoh example subscriber, should print something
>> [Subscriber] Received PUT ('example': 'Hello, world! 7')
>> [Subscriber] Received PUT ('example': 'Hello, world! 8')
>> [Subscriber] Received PUT ('example': 'Hello, world! 9')
After that output, the RTEMS shutdown will display the various RTEMS threads running and their memory usage.

This showed that the Zenoh Pico client running in RTEMS successfully reached the Zenoh router running natively on the host.
Expand All @@ -127,5 +145,7 @@ Clean up
-------------

If you would like, you can now remove the network tap device that we created in the previous step:

.. code-block:: console
zynq_rtems/stop_network_tap.sh

0 comments on commit f26a180

Please sign in to comment.