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
Google this yourself
sudo apt install nodejs
sudo apt install npm
npm install --save mineflayer-collectblock
npm i rclnodejs
- Init submodules to pull the mineros interfaces
git submodule update --init --recursive
git submodule update --recursive
-
from root run
colcon build
to build the ros packages -
Generate the javascript Ros message interface
cd src/mineros-js
npx generate-ros-messages
Make sure a minecraft server is running on localhost:25565
ros2 launch src/mineros-js/launch/example.launch.py
Then launch your own script to control the bot
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