Skip to content
Open
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
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Exclude build artifacts and logs
/cache/
*.log

# Exclude other potential build artifacts
*.o
*.a
*.so

# Exclude IDE and system-specific files
*.swp
*.swo
.DS_Store
*.pyc
*.pyo

# Exclude local configuration files
*.env
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "src/turtlebot3_simulations"]
path = src/turtlebot3_simulations
url = https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
branch = humble-devel
100 changes: 99 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,99 @@
# Collaborative-Autonomous-Multi-Agent-SLAM
# Collaborative-Autonomous-Multi-Agent-SLAM
## Table of Contents
- [Setup Development Environment](#setup-development-environment)
- [ROS](#ros)
- [Gazebo](#gazebo)
- [Python](#python)
- [Troubleshooting Help](#troubleshooting-help)
- [Interacting with the Platform](#interacting-with-the-platform)
- [Resources](#resources)

## Setup Development Environment

### ROS
To set up the ROS environment, follow these steps:

1. **Install ROS**
- Open the "x64 Native Tools Command Prompt for VS 2019" as Administrator.
- Install Chocolatey package manager:
```sh
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
```
- Install Git:
```sh
choco upgrade git -y
```
- Install ROS:
```sh
mkdir c:\opt\chocolatey
set ChocolateyInstall=c:\opt\chocolatey
choco source add -n=ros-win -s="https://aka.ms/ros/public" --priority=1
choco upgrade ros-noetic-desktop_full -y --execution-timeout=0
```

2. **Source the ROS Environment**
- Open the Visual Studio Command Prompt as Administrator.
- Source the setup script:
```sh
c:\opt\ros\noetic\x64\setup.bat
```

3. **Verify the ROS Installation**
- Check the ROS version:
```sh
rosversion -d
```

For more detailed instructions, refer to the [Installing and Configuring Your ROS Environment](https://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment) tutorial.

### Gazebo
To set up Gazebo, follow these steps:

1. **Install Gazebo**
- Use the ROS package manager to install Gazebo:
```sh
sudo apt-get install ros-noetic-gazebo-ros-pkgs ros-noetic-gazebo-ros-control
```

2. **Verify the Gazebo Installation**
- Run Gazebo to ensure it's installed correctly:
```sh
gazebo
```

### Python
To set up Python for ROS:

1. **Install Python**
- Download and install Python from the [official website](https://www.python.org/downloads/).

2. **Install ROS Python Dependencies**
- Install the necessary Python packages for ROS:
```sh
pip install -U rosdep rosinstall_generator wstool rosinstall six vcstools
```

## Troubleshooting Help
If you encounter issues during setup, here are some common troubleshooting steps:

- Ensure all paths are correctly set in your environment variables.
- Verify that you are running the commands in the appropriate shell (e.g., Visual Studio Command Prompt for VS 2019).
- Check for any typos or syntax errors in the commands.
- Refer to the [ROS Troubleshooting Guide](https://wiki.ros.org/ROS/Installation/Windows#Troubleshooting).

## Interacting with the Platform
To start working with the platform, follow these steps:

1. **Create a Catkin Workspace**
```sh
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
catkin_make
source devel/setup.bash
cd ~/catkin_ws/src
catkin_create_pkg my_package std_msgs rospy roscpp
cd ~/catkin_ws
catkin_make



53 changes: 53 additions & 0 deletions src/rviz-mac/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Use the official ROS Humble base image
FROM ros:humble
# Update apt sources to use Tsinghua mirrors
RUN sed -i 's/ports\.ubuntu\.com/mirrors\.tuna\.tsinghua\.edu\.cn/g' /etc/apt/sources.list && \
sed -i 's/packages\.ros\.org/mirrors\.tuna\.tsinghua\.edu\.cn/g' /etc/apt/sources.list.d/ros2-latest.list
# Install necessary packages
RUN apt-get update && apt-get install -y \
iputils-ping \
net-tools \
wget \
sudo \
python3-pip \
mesa-utils \
mesa-utils-extra \
ros-humble-desktop \
ros-humble-cartographer \
ros-humble-cartographer-ros \
ros-humble-navigation2 \
ros-humble-nav2-bringup \
ros-humble-rviz2 \
bash \
fluxbox \
git \
novnc \
supervisor \
x11vnc \
xterm \
xvfb && \
rm -rf /var/lib/apt/lists/*
# Create a workspace
RUN mkdir -p /root/catkin_ws
WORKDIR /root/catkin_ws
# Source ROS environment
RUN echo "source /opt/ros/humble/setup.bash" >> /root/.bashrc
# Set environment variables
ENV HOME=/root \
DEBIAN_FRONTEND=noninteractive \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
LC_ALL=C.UTF-8 \
DISPLAY=:0.0 \
DISPLAY_WIDTH=1024 \
DISPLAY_HEIGHT=768 \
RUN_XTERM=yes \
RUN_FLUXBOX=yes \
ROS_MASTER_URI=http://172.16.0.240:11311 \
ROS_HOSTNAME=ros
# Copy application files
COPY . /app
# Set the default command
CMD ["/app/entrypoint.sh"]
# Expose port
EXPOSE 8080
3 changes: 3 additions & 0 deletions src/rviz-mac/conf.d/fluxbox.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[program:fluxbox]
command=fluxbox
autorestart=true
3 changes: 3 additions & 0 deletions src/rviz-mac/conf.d/websockify.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[program:websockify]
command=websockify --web /usr/share/novnc 8080 localhost:5900
autorestart=true
3 changes: 3 additions & 0 deletions src/rviz-mac/conf.d/x11vnc.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[program:x11vnc]
command=x11vnc -forever -shared
autorestart=true
3 changes: 3 additions & 0 deletions src/rviz-mac/conf.d/xterm.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[program:xterm]
command=xterm
autorestart=true
3 changes: 3 additions & 0 deletions src/rviz-mac/conf.d/xvfb.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[program:xvfb]
command=Xvfb :0 -screen 0 "%(ENV_DISPLAY_WIDTH)s"x"%(ENV_DISPLAY_HEIGHT)s"x24 -listen tcp -ac
autorestart=true
19 changes: 19 additions & 0 deletions src/rviz-mac/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
set -ex

RUN_FLUXBOX=${RUN_FLUXBOX:-yes}
RUN_XTERM=${RUN_XTERM:-yes}

case $RUN_FLUXBOX in
false|no|n|0)
rm -f /app/conf.d/fluxbox.conf
;;
esac

case $RUN_XTERM in
false|no|n|0)
rm -f /app/conf.d/xterm.conf
;;
esac

exec supervisord -c /app/supervisord.conf
5 changes: 5 additions & 0 deletions src/rviz-mac/supervisord.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[supervisord]
nodaemon=true

[include]
files = /app/conf.d/*.conf