Source Installation
System Requirements
- Ubuntu 22.04
- ROS 2 Humble
Install Build Tools
Install Gradle
bashsudo apt install gradle
INFO
Make sure you have Gradle 3.2 (or later) installed.
Install required tools
bashsudo apt install curl python3-colcon-common-extensions python3-pip python3-vcstool
Install Gradle extensions for colcon
bashpython3 -m pip install -U git+https://github.com/colcon/colcon-gradle python3 -m pip install --no-deps -U git+https://github.com/colcon/colcon-ros-gradle
ros2_java Setup
Download the ROS 2 Java repositories into a workspace
bashmkdir -p ros2_java_ws/src cd ros2_java_ws curl -skL https://raw.githubusercontent.com/minecraft-ros2/ros2_java/main/ros2_java_desktop.repos | vcs import src
Install ROS dependencies
bashrosdep install --from-paths src -y -i --skip-keys "ament_tools"
Build the desktop packages
bashcolcon build
WARNING
Do not use
--symlink-install
minecraft_ros2 Installation
Set the environment variable Add the following line to your shell config file (e.g.
~/.bashrc
), pointing to theros2_java
install directory:bashexport ROS2JAVA_INSTALL_PATH=/home/USERNAME/ros2_java_ws/install
INFO
Replace
USERNAME
with the appropriate username for your environment. You can verify it by running thepwd
command.Then reload your shell:
bashsource ~/.bashrc
Launch Minecraft with the mod
bashgit clone https://github.com/minecraft-ros2/minecraft_ros2.git ./runClient.sh
Visualize in RViz2 Start RViz2 and load the provided configuration to view Minecraft data:
bashrviz2 -d minecraft.rviz