MineROS allows the user to fully control a MC bot using ROS services and topics, The current version of MineROS is made for ROS2 Humble and is still in development. The purpose of this project is to give a conducive learning environment for people who want to learn ROS2 and python. Specifically for people who want to learn mavros, as this is what the project attempts to mock.
- ROS2 Humble
- Python3
- Nodejs version >= 20
- Mineflayer Api
- Minecraft version = 1.20
In the minecraft launcher
git clone [email protected]:AscendNTNU/mineros.git --recursiveAll commands should be run from the root of this repo.
Check if node is already installed
node -vIf it is below v20, remove it:
sudp apt remove nodejs --autoremoveThen install the correct version
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs
# Verify correct version:
node -v # should show v20.x
npm -v # should be avove 9.0cd src/mineros-js
npm install mineflayer-collectblock rclnodejs- Generate the javascript ROS message interface
npx generate-ros-messages
cd ..- Build the ROS packages:
colcon build --symlink-install
# When developing, symlink makes it so we don't need to build every time we change a file.
# This does not apply to C++ files as they need to be compiledMake sure a minecraft server is running on localhost:25565 Source the workspace:
source install/setup.shThen launch the mineros bot
ros2 launch mineros-js bot.launch.pyThen launch your own script to control the bot. For example, in a new shell run:
source install/setup.sh
ros2 launch my_first_package main.launch.pyThe my_first_package is where you'll be creating your ROS nodes. See the README.
Following is general api information and links to api docs.
IMPORTANT: BLOCKS DO NOT HAVE THE SAME IDS AS ITEMS
Several of the services and topics require knowledge of the minecraft block ids, this can be found here REMEBER TO SELECT THE CORRECT MINECRAFT VERSION: 1.20 http://prismarinejs.github.io/minecraft-data/?d=blocks
on the boot up of the MineROS system all item ids are written to the file docs/items.txt. Note that blocks dont have the same id as items


