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
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[submodule "src/turtlebot3_simulations"]
path = src/turtlebot3_simulations
url = https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
branch = humble-devel
[submodule "src/.devcontainer/turtlebot_ws/turtlebot3"]
path = src/.devcontainer/turtlebot_ws/turtlebot3
url = https://github.com/ROBOTIS-GIT/turtlebot3.git
branch = humble-devel
[submodule "src/.devcontainer/turtlebot_ws/turtlebot3_simulations"]
path = src/.devcontainer/turtlebot_ws/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



60 changes: 60 additions & 0 deletions src/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Use the official ROS Humble base image
FROM ros:humble

# Set arguments for the user creation
ARG USERNAME=krish
ARG USER_UID=1000
ARG USER_GID=$USER_UID

# Switch to root to install packages
USER root

# Install necessary packages including X11 and Qt dependencies
RUN apt-get update && apt-get install -y \
sudo \
python3-pip \
ros-humble-desktop \
ros-humble-gazebo-* \
ros-humble-cartographer \
ros-humble-cartographer-ros \
ros-humble-navigation2 \
ros-humble-nav2-bringup \
ros-humble-turtlebot3* \
libxcb-xinerama0 \
x11-apps \
libgl1-mesa-glx \
libqt5gui5 \
&& rm -rf /var/lib/apt/lists/*

# Create the user
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME

# Set the default shell
ENV SHELL /bin/bash

# Set environment variables for GUI support
ENV DISPLAY=:0
ENV QT_X11_NO_MITSHM=1
ENV XDG_RUNTIME_DIR=/tmp/runtime-$USERNAME

# Set TurtleBot3 model environment variable
ENV TURTLEBOT3_MODEL=burger

# Set the working directory
WORKDIR /home/$USERNAME

# Source ROS environment in .bashrc and set up TurtleBot3 simulation setup
RUN echo "source /opt/ros/humble/setup.bash" >> /home/$USERNAME/.bashrc \
&& echo "export TURTLEBOT3_MODEL=\$TURTLEBOT3_MODEL" >> /home/$USERNAME/.bashrc

# Create a ROS workspace directory
RUN mkdir -p /home/$USERNAME/ros2_ws/src

# Switch to the new user
USER $USERNAME

# Set the default command
CMD ["/bin/bash"]
42 changes: 42 additions & 0 deletions src/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "ROS 2 Development Container",
"privileged": true,
"remoteUser": "krish",
"build": {
"dockerfile": "Dockerfile",
"args": {
"USERNAME": "krish"
}
},
"workspaceFolder": "/home/krish/ros2_ws",
"workspaceMount": "source=${localWorkspaceFolder}/src,target=/home/krish/ros2_ws/src,type=bind",
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools",
"ms-vscode.cpptools-themes",
"twxs.cmake",
"donjayamanne.python-extension-pack",
"eamodio.gitlens",
"ms-iot.vscode-ros"
]
}
},
"containerEnv": {
"DISPLAY": "unix:0",
"ROS_LOCALHOST_ONLY": "1",
"ROS_DOMAIN_ID": "42"
},
"runArgs": [
"--net=host",
"-e", "DISPLAY=${env:DISPLAY}"
],
"mounts": [
"source=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind,consistency=cached",
"source=/dev/dri,target=/dev/dri,type=bind,consistency=cached",
"source=${localWorkspaceFolder}/../cache/build,target=/home/krish/ros2_ws/build,type=bind",
"source=${localWorkspaceFolder}/../cache/install,target=/home/krish/ros2_ws/install,type=bind",
"source=${localWorkspaceFolder}/../cache/log,target=/home/krish/ros2_ws/log,type=bind"
],
"postCreateCommand": "sudo rosdep update && sudo rosdep install --from-paths src --ignore-src -y && sudo chown -R krish /home/krish/ros2_ws"
}
Empty file.
1 change: 1 addition & 0 deletions src/.devcontainer/turtlebot_ws/turtlebot3
Submodule turtlebot3 added at a7dd05
1 change: 1 addition & 0 deletions src/.devcontainer/turtlebot_ws/turtlebot3_simulations
Submodule turtlebot3_simulations added at d16cdb