https://github.com/Ryung-coding/Sim_palletrone

Palletrone Simulator

https://www.youtube.com/watch?v=9ugz9QTPFvg

Palletrone is a compound of Pallet and Drone, designed as a fully-actuated multirotor platform. It enables stable cargo transportation without undesired attitude changes, overcoming the limitations of underactuated multirotors.

image.png

System Configuration

Symbol Description
m m Palletrone mass
ζ zeta Force-to-yaw torque transform ratio
r r Moment arm
rz r_z z-axis distance / IMU & thruster

<aside> 🔑

Environment Setup

Tested on Ubuntu 22.04 with ROS2 Humble and MuJoCo.

1) ROS2 Humble Installation

Official guide: ROS2 Humble Installation

# Create workspace / Build and source
mkdir -p ~/palletrone_ws/src
cd ~/palletrone_ws
colcon build --symlink-install
source install/setup.bash

2) MuJoCo Installation

Official GitHub: https://github.com/google-deepmind/mujoco

# System dependencies
sudo apt update
sudo apt install libglfw3 libglfw3-dev libglew-dev
python -m pip install mujoco
python -m mujoco.viewer

3) Launch

# Build and source (from your workspace root)
ros2 launch palletrone_cmd pt_launch.py

</aside>

Project Structure

Sim_palletrone/
└── src/
    ├── palletrone_interfaces/          # ROS2 message definitions
    │   └── msg/
    │       ├── Cmd.msg                 # Desired position/attitude command (units below)
    │       ├── Input.msg               # Control input: motor speeds & servo angles
    │       ├── PalletroneState.msg     # Simulator state (Z-up)
    │       └── Wrench.msg              # Body-frame forces & torques
    │
    ├── palletrone_cmd/                 # Command publisher
    │   ├── launch/
    │   │   └── pt_launch.py            # Launch plant + controllers + cmd
    │   └── src/
    │       └── position_cmd.cpp        # Publishes 3D desired position
    │
    ├── palletrone_controller/          # Controllers
    │   └── src/
    │       ├── allocator_controller.cpp# Control allocation (ref1-based)
    │       └── wrench_controller.cpp   # Position/attitude PID → Wrench
    │
    └── plant/                          # MuJoCo plant
        ├── plant/
        │   └── plant.py                # Dynamics integration + state publishing
        └── xml/                        # Model & scene (used by the plant)
            ├── Palletrone.xml
            └── scene.xml

Message Definitions

palletrone_interfaces/msg/Cmd.msg

# Desired position command
# Units: position in meters [m]
float32[3] pos_cmd   # [x, y, z] in meters (Z-up world frame)

Units: position xyz are in meters (m).

palletrone_interfaces/msg/Input.msg

# Control input: motor speeds and servo angles
# Units: motor speeds in rad/s, servo angles in rad
float32[8] u # omega(u1u4) : motor BLDC speeds [rad/s] / theta(u5u8) : servo tilt angles [rad]

Units: omega in rad/stheta in rad.

palletrone_interfaces/msg/PalletroneState.msg

# Simulator state (Z-up convention)
# Units: position [m], velocity [m/s], rpy [rad], angular velocity [rad/s]
float32[3] pos        # [x, y, z] (Z-up world)
float32[3] vel        # [vx, vy, vz]
float32[3] rpy        # [roll, pitch, yaw]
float32[3] w_rpy      # [roll_rate, pitch_rate, yaw_rate]