-
Clone the repository:
git clone https://github.com/DIT-ROBOTICS/Eurobot-2025-Main.git
-
Display the help message:
./main
Output:
----- [ MAIN Usage ] ------------------------ | build - Build the ROS workspace | run - Run the main program | groot - Launch Groot2 | enter - Enter the container | close - Stop the container | --command <cmd> - Run a custom command ---------------------------------------------
-
Build the workspace (both image and ROS):
./main build
-
Run the main program:
./main run
-
Launch Groot2 (only for Groot functionality):
./main groot
-
Enter the container (equivalent to
docker exec -it
but more powerful):./main enter
-
Stop the container and retrieve all resources:
./main close
Note: Resources are usually retrieved automatically after the program closes or crashes.
-
Run a custom command in the container (whether the container is running or not):
./main --command "your command"
- bt_launch.py:
pkg_dir = os.path.join('/home/ros/Eurobot-2025-Main/src/bt_app_2025')
- bt_launch.py:
{"frame_id": "base_footprint"},
- bt_launch.py:
arguments=['serial', '-b', '115200', '-D', '/dev/mission']
To use Groot, you need to first enter the container:
./main enter
Then, run the following command to pull the AppImage:
groot/install.sh
However, it is recommended to use the isolation application with backup functionality provided by DIT-ROBOTICS/DIT-Tools.
- Register nodes:
factory.registerNodeType<${node_name}>("${node_name}");
- Load nodes into an
.xml
file. - Create the tree:
(Replace
auto tree = factory.createTree("MainTree");
"MainTree"
with the desired tree name.) - Execute the tree:
$ ros2 run bt_app_test bt_ros2
- Write new nodes.
- Register the nodes in
bt_m.cpp
. - Build the package:
$ colcon build --packages-select bt_app_2025
- Load the new nodes into an
.xml
file:$ ros2 run bt_app_2025 bt_m
- Open Groot:
./main groot
- Edit and save your tree in Groot.
- Execute the tree:
$ ros2 run bt_app_2025 bt_m
- Select the desired plan and tree in
bt_m_config
(stores behavior tree configuration.xml
files). - Launch the programs:
$ ros2 launch bt_app_2025 bt_launch.py
├── CMakeLists.txt
├── bt_m_config
│ ├── Project.btproj
│ ├── bt_m_tree_node_model.xml
│ ├── bt_plan_a.xml
│ └── firmware_test.xml
├── include
│ └── bt_app_2025
│ ├── bt_nodes_firmware.h
│ ├── bt_nodes_navigation.h
│ ├── bt_nodes_others.h
│ └── bt_nodes_receiver.h
├── launch
│ └── bt_launch.py
├── package.xml
├── params
│ └── config_path.yaml
└── src
├── bt_m.cpp
├── bt_nodes_firmware.cpp
├── bt_nodes_navigation.cpp
├── bt_nodes_others.cpp
└── bt_nodes_receiver.cpp
bt_nodes_firmware
: BT nodes related to firmware missions.bt_nodes_navigation
:Navigation
: Input global position and goal orientation.Docking
: Input staging point and offset code.Rotation
: Input desired rotation angle.
bt_nodes_receiver
: BT nodes for receiving messages from other teams.
st_point
: Sets the robot's initial pose (currently set to Plan A).ready_feedback
: ReceivesStartUpSrv
and sets it toTrue
(currently initialized asTrue
).team
: Chooses between yellow and blue team sides (not initialized yet).
- Launch the simulation:
$ ros2 launch navigation2_run sim_launch.py
- Open RViz:
(Load
$ rviz2
demo.rviz
.) - Open the Foxglove connection program:
$ ros2 launch foxglove_bridge foxglove_bridge_launch.xml port:=8765
- Send a navigation goal:
ros2 action send_goal /navigate_to_pose nav2_msgs/action/NavigateToPose "{pose: {header: {stamp: {sec: 0, nanosec: 0}, frame_id: 'map'}, pose: {position: {x: 0.35, y: 1.7, z: 0.0}, orientation: {x: 0.0, y: 0.0, z: 0.707, w: 0.707}}}}"
- Run the rival simulation:
$ ros2 run rival_layer RivalSim --ros-args -p Rival_mode:=<rival mode>
- Remote Control: Move the enemy robot manually:
$ ros2 run rival_simulation my_teleop --ros-args -p Rival_mode:=<rival mode>
- Behavior Tree: Script enemy robot movements:
$ ros2 launch rival_simulation bt_launch.py
- Use
dmesg
to find the device location:$ dmesg -w
- Run the micro-ROS agent:
$ ros2 run micro_ros_agent micro_ros_agent serial -b 115200 -D <your device location>
- Stores all custom message types (
msg
,srv
,action
) for better organization. - Messages:
NodeStatus
: Currently unused.
- Services:
StartUpSrv
: Received by the startup node to start the robot (currently unused).
- Actions:
ExecuteTree
: Currently unused.Navigation
: Used inbt_app_test
for simple navigation.
- Action interface provided by the navigation team for docking messages.
- Added for basic communication testing with the firmware.
- A shared space for testing new BT node functionalities. Once the competition program stabilizes, this package will be moved to a separate repository.
- Components:
bt_action_node_lib
: Write action nodes.decorator_node_lib
: Write decorator nodes.bt_ros2.cpp
: Functions similarly tobt_m.cpp
.