tixianw / FastRodReconstruction

MIT License
2 stars 0 forks source link

Fast Rod Reconstruction

This provides instructions for setting up and running a fast rod reconstruction on a ROS2 with Vicon system using Docker containers.
Follow these steps to get the system up and running.

Prerequisites

Step 1: Run the Vicon Client

Option 1: Vicon System

If you have connected to the Vicon wifi, then in the first terminal, run the following command to start the Vicon client:

docker run -it --rm hansonhschang/ros2-vicon ros2 launch vicon_receiver client.launch.py

This command launches a Vicon client within a Docker container.

Option 2: Mock Vicon System

If you don't have access to the Vicon, then in the first terminal, run the following command to start the Vicon mock client:

docker run -it --rm hansonhschang/ros2-vicon ros2 launch vicon_receiver mock_client.launch.py

This command launches a Vicon mock client within a Docker container.

Step 2: Start the ROS2 Vicon Container

In the second terminal, run:

docker run -it --rm hansonhschang/ros2-vicon

This creates a container from the image and the terminal will show up like the following and gives the id <container_id> of the container. In this case the id is 7cb5009f616f.

root@7cb5009f616f:/#

Step 3: Install this Fast Rod Reconstruction directory

Remain in the second terminal, and download this repository into the running container:

git clone https://github.com/tixianw/FastRodReconstruction.git
cd FastRodReconstruction

Note: If git clone causes too many trouble for you, one may also copy the downloaded repository from your local system to the container. For more detail, check the docker documentation on the command: docker cp.

Now, follow the next two steps and its corresponding instruction to install Poetry and set up the package:

  1. Install Poetry:

    make install-poetry

    Important: If you see a message about adding additional directory to your PATH, make sure to follow the provided instructions.

  2. Install the repository as a package:

    make install

    Important: Poetry manages its own virtual environments. If you're not already in a virtual environment, Poetry will create a new one for this project. To activate this environment and use the installed package, please follow the provided instructions.

Step 4: Launch the Reconstruction Node

Change directory to the examples folder:

cd examples

To launch the reconstruction node:

python3 launch_reconstruction_node.py

This command will launch the reconstruction node, which will begin listening to multiple ROS2 topics related to the Vicon system, and run the fast rod reconstruction.

Additional Information

Next Steps

After launching the reconstruction node, you should see output in your terminal showing data from various reconstruction-related topics. You can now start analyzing this data or integrating it with other ROS2 nodes as needed for your specific application.

For more advanced usage, consider:

Refer to the specific documentation of your Vicon receiver package for more detailed information on the data structure and available topics.