Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
3cc406c
add new dependency pinocchio
sugikazu75 Apr 11, 2025
c18a8b0
[dragon] fix urdf not to include rotor as joint
sugikazu75 Apr 11, 2025
f3a45d9
[dragon] add launcher to set robot_description to rosparameter
sugikazu75 Apr 11, 2025
b432aa1
[aerial_robot_dynamics] add new package
sugikazu75 Apr 11, 2025
a321b84
[aerial_robot_dynamics] implement forward dynamics with thruster wren…
sugikazu75 Apr 11, 2025
ee3c2aa
[dragon] add actuator limits to xacro
sugikazu75 Apr 14, 2025
fd3965f
[aerial_robot_dynamics] implement inverse dynamics with thrust using …
sugikazu75 Apr 14, 2025
bdb84e4
[aerial_robot_dynamics] measure execution time of FD and ID in testin…
sugikazu75 Apr 14, 2025
6a06f88
[aerial_robot_dynamics] improve test for FD and ID using random noise…
sugikazu75 Apr 14, 2025
39cc713
[aerial_robot_dynamics] implement forwardDynamicsDerivative with thru…
sugikazu75 Apr 16, 2025
6a8d91f
[aerial_robot_dynamics] implement external wrench by thrust calculate…
sugikazu75 Apr 17, 2025
27aa365
[aerial_robot_dynamics] implement numerical derivative of jacobian of…
sugikazu75 Apr 22, 2025
fbe1892
[aerial_robot_dynamics] find openmp for parallel computing for eigen
sugikazu75 Apr 22, 2025
f2d28f6
[aerial_robot_dynamics] implement contraction of tensor and vector
sugikazu75 Apr 22, 2025
55e4f77
[aerial_robot_dynamics] refactor QP for inverse dynamics
sugikazu75 Apr 22, 2025
dc75019
[aerial_robot_dynamics][WIP] implement inverse dynamics derivatives u…
sugikazu75 Apr 22, 2025
276992e
[aerial_robot_dynamics][WIP] implementing analytical derivative of ja…
sugikazu75 Apr 22, 2025
2fe3af3
[aerial_robot_dynamics] implement derivatives of inverse dynamics
sugikazu75 Apr 22, 2025
69b52e1
[aerial_robot_dynamics] separate base class and test class and refact…
sugikazu75 Apr 22, 2025
4ab2092
[aerial_robot_dynamics] enable to switch build test code or not
sugikazu75 Apr 22, 2025
b0359ce
[aerial_robot_dynamics] test tauext partial thrust partial q (not pas…
sugikazu75 Apr 25, 2025
3dc4f6d
[aerial_robot_dynamics] format all code
sugikazu75 Apr 25, 2025
d11a29c
[rosinstall] update pinocchio version
sugikazu75 Apr 30, 2025
c1be74c
[aerial_robot_dynamics] consider offset from parent joint and rotor f…
sugikazu75 May 1, 2025
4f1464d
[aerial_robot_dynamics] implement analytical second derivative of thr…
sugikazu75 May 2, 2025
a20e91e
[rosinstall] add pinocchio for ros one distro
sugikazu75 May 2, 2025
20ee458
[aerial_robot_dynamics] change catkin package config
sugikazu75 May 8, 2025
31764fc
[aerial_robot_dynamics] improve differential calculation for q. Use p…
sugikazu75 May 12, 2025
c2028b6
[aerial_robot_dynamics] support fixed based robot model
sugikazu75 May 12, 2025
73e18f4
[aerial_robot_dynamics] fix variable for constructor in test node
sugikazu75 May 12, 2025
deafaff
[aerial_robot_dynamics] fix reset pose quaternion depend on floating …
sugikazu75 May 12, 2025
d8c9c93
[aerial_robot_dynamics] fix return value of inverse dynamics and its …
sugikazu75 May 14, 2025
344b01e
[aerial_robot_dynamics] update test code for inverse dynamics because…
sugikazu75 May 14, 2025
21809cf
[aerial_robot_dynamics] change parameter name of robot model descript…
sugikazu75 May 28, 2025
fe17c31
[aerial_robot_dynamics] get thrust limit and joint torque limit from …
sugikazu75 Jun 18, 2025
640e0c4
[aerial_robot_dynamics] measure inverse dynamics solve time
sugikazu75 Jun 20, 2025
b061dd2
[aerial_robot_dynamics] get thrust hessian weight from ros parameter …
sugikazu75 Jun 20, 2025
aaab72d
[aerial_robot_dynamics] get rotor direction from urdf and wait until …
sugikazu75 Jun 25, 2025
621beb1
[aerial_robot_dynamics] make a function public to get tau by thrust d…
sugikazu75 Jul 2, 2025
ba1190c
[aerial_robot_dynamics] add accessors to thrust_hessian_weight and jo…
sugikazu75 Jul 13, 2025
3324b43
[aerial_robot_dynamics] set upper and lower limit for joint q
sugikazu75 Jul 16, 2025
8dea6c1
[aerial_robot_dynamics] enable to access fext by thrust from other class
sugikazu75 Aug 6, 2025
13e8b2c
[aerial_robot_dynarmics] enable to get rotor frame indices
sugikazu75 Aug 8, 2025
f3443db
[aerial_robot_dynamics] set joint torque limit for floating base part…
sugikazu75 Aug 13, 2025
572e44a
[aerial_robot_dynamics] add compile options
sugikazu75 Oct 27, 2025
cacff36
Revert "[dragon] add launcher to set robot_description to rosparameter"
sugikazu75 Oct 30, 2025
43bcd3c
Revert "[dragon] fix urdf not to include rotor as joint"
sugikazu75 Oct 30, 2025
8890c8e
[dragon] revert unused property in urdf
sugikazu75 Oct 30, 2025
0c84f22
[aerial_robot_dynamics] install include directory and library
sugikazu75 Oct 30, 2025
83d98a0
[aerial_robot_dynamics] fix cmake options
sugikazu75 Oct 30, 2025
25b0a05
[aerial_robot_dynamics] fix FD test. consider rotor direction
sugikazu75 Dec 1, 2025
6627739
[aerial_robot_dynamics] update FD derivative test. I found that aba d…
sugikazu75 Dec 1, 2025
e29330e
[aerial_robot_dynamics] add a script to generate pinocchio_robot_desc…
sugikazu75 Dec 25, 2025
dbe498f
[aerial_robot_dynamics] add simple urdf for test and some util launcher
sugikazu75 Dec 25, 2025
a299ab3
[aerial_robot_dynamics] add new API to calculate derivative of tau by…
sugikazu75 Dec 25, 2025
f14b4bb
[aerial_robot_dynamics] decrease tolerance of FD derivative test
sugikazu75 Dec 25, 2025
607d9f3
[aerial_robot_dynamics] add new test for derivative of tau by thrust …
sugikazu75 Dec 25, 2025
1079170
[aerial_robot_dynamics] add new API to get parent joint w.r.t rotor
sugikazu75 Dec 25, 2025
46d8b23
Merge branch 'develop/feature/dynamics' into PR/feature/dynamics
sugikazu75 Dec 29, 2025
2315d76
[aerial_robot_dynamics] add dependencies to package.xml
sugikazu75 Dec 29, 2025
3b59780
Merge branch 'develop/feature/dynamics' into PR/feature/dynamics
sugikazu75 Dec 29, 2025
97bdfe3
[aerial_robot_dynamics] install script and launch directory to workspace
sugikazu75 Dec 29, 2025
292e08e
Merge branch 'develop/feature/dynamics' into PR/feature/dynamics
sugikazu75 Dec 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions aerial_robot_debian.rosinstall
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,9 @@
local-name: mocap_optitrack
uri: https://github.com/sugikazu75/mocap_optitrack.git
version: 50fb60d

# pinocchio
- git:
local-name: pinocchio
uri: https://github.com/stack-of-tasks/pinocchio.git
version: 666d5d4
79 changes: 79 additions & 0 deletions aerial_robot_dynamics/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
cmake_minimum_required(VERSION 3.0.2)
project(aerial_robot_dynamics)

add_compile_options(-std=c++17)

find_package(catkin REQUIRED COMPONENTS
roscpp
urdf
)

find_package(Eigen3 REQUIRED)
find_package(pinocchio REQUIRED)
find_package(OsqpEigen REQUIRED)
find_package(urdfdom_headers REQUIRED)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -g -DNDEBUG")

option(BUILD_TEST "Build Test Code" ON)

catkin_package(
INCLUDE_DIRS include
LIBRARIES robot_model
)

include_directories(
include
${catkin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
${OsqpEigen_INCLUDE_DIRS}
${pinocchio_INCLUDE_DIRS}
${urdfdom_headers_INCLUDE_DIRS}
)

add_library(robot_model src/robot_model.cpp)
target_link_libraries(robot_model
${catkin_LIBRARIES}
${OsqpEigen_LIBRARIES}
${pinocchio_LIBRARIES}
)

if(BUILD_TEST)
add_library(robot_model_test
src/test/fd_test.cpp
src/test/fd_derivative_test.cpp
src/test/id_test.cpp
src/test/id_derivative_test.cpp
src/test/tauext_by_thrust_q_derivative_test.cpp
src/test/tauext_by_thrust_derivative_q_derivative_test.cpp
)
target_link_libraries(robot_model_test
robot_model
${catkin_LIBRARIES}
${OsqpEigen_LIBRARIES}
${pinocchio_LIBRARIES}
)

add_executable(test_node src/test/test_node.cpp)
target_link_libraries(test_node
robot_model
robot_model_test
${catkin_LIBRARIES}
${OsqpEigen_LIBRARIES}
${pinocchio_LIBRARIES}
)
endif()

install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})

install(TARGETS robot_model
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})

install(DIRECTORY launch scripts
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
USE_SOURCE_PERMISSIONS
)
216 changes: 216 additions & 0 deletions aerial_robot_dynamics/config/rviz_config
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
Panels:
- Class: rviz/Displays
Help Height: 78
Name: Displays
Property Tree Widget:
Expanded:
- /Global Options1
- /Status1
Splitter Ratio: 0.3529411852359772
Tree Height: 555
- Class: rviz/Selection
Name: Selection
- Class: rviz/Tool Properties
Expanded:
- /2D Pose Estimate1
- /2D Nav Goal1
- /Publish Point1
Name: Tool Properties
Splitter Ratio: 0.5886790156364441
- Class: rviz/Views
Expanded:
- /Current View1
Name: Views
Splitter Ratio: 0.5
- Class: rviz/Time
Name: Time
SyncMode: 0
SyncSource: ""
Preferences:
PromptSaveOnExit: true
Toolbars:
toolButtonStyle: 2
Visualization Manager:
Class: ""
Displays:
- Alpha: 0.5
Cell Size: 1
Class: rviz/Grid
Color: 160; 160; 164
Enabled: true
Line Style:
Line Width: 0.029999999329447746
Value: Lines
Name: Grid
Normal Cell Count: 0
Offset:
X: 0
Y: 0
Z: 0
Plane: XY
Plane Cell Count: 10
Reference Frame: <Fixed Frame>
Value: true
- Alpha: 0.5
Class: rviz/RobotModel
Collision Enabled: false
Enabled: false
Links:
All Links Enabled:
{}
Expand Joint Details: false
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
Name: RobotModel
Robot Description: robot_description
TF Prefix: ""
Update Interval: 0
Value: false
Visual Enabled: true
- Class: rviz/TF
Enabled: true
Filter (blacklist): ""
Filter (whitelist): ""
Frame Timeout: 15
Frames:
All Enabled: true
gimbal1_pitch_link:
Value: true
gimbal1_roll_link:
Value: true
gimbal2_pitch_link:
Value: true
gimbal2_roll_link:
Value: true
gimbal3_pitch_link:
Value: true
gimbal3_roll_link:
Value: true
gimbal4_pitch_link:
Value: true
gimbal4_roll_link:
Value: true
joint1_link:
Value: true
joint2_link:
Value: true
joint3_link:
Value: true
link1:
Value: true
link2:
Value: true
link3:
Value: true
link4:
Value: true
root:
Value: true
thrust1:
Value: true
thrust2:
Value: true
thrust3:
Value: true
thrust4:
Value: true
Marker Alpha: 1
Marker Scale: 0.6000000238418579
Name: TF
Show Arrows: true
Show Axes: true
Show Names: true
Tree:
root:
link1:
gimbal1_roll_link:
gimbal1_pitch_link:
thrust1:
{}
joint1_link:
link2:
gimbal2_roll_link:
gimbal2_pitch_link:
thrust2:
{}
joint2_link:
link3:
gimbal3_roll_link:
gimbal3_pitch_link:
thrust3:
{}
joint3_link:
link4:
gimbal4_roll_link:
gimbal4_pitch_link:
thrust4:
{}
Update Interval: 0
Value: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Default Light: true
Fixed Frame: root
Frame Rate: 30
Name: root
Tools:
- Class: rviz/Interact
Hide Inactive Objects: true
- Class: rviz/MoveCamera
- Class: rviz/Select
- Class: rviz/FocusCamera
- Class: rviz/Measure
- Class: rviz/SetInitialPose
Theta std deviation: 0.2617993950843811
Topic: /initialpose
X std deviation: 0.5
Y std deviation: 0.5
- Class: rviz/SetGoal
Topic: /move_base_simple/goal
- Class: rviz/PublishPoint
Single click: true
Topic: /clicked_point
Value: true
Views:
Current:
Class: rviz/Orbit
Distance: 2.9182982444763184
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Field of View: 0.7853981852531433
Focal Point:
X: 1.0487598180770874
Y: 0.029148178175091743
Z: -0.06674248725175858
Focal Shape Fixed Size: true
Focal Shape Size: 0.05000000074505806
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.009999999776482582
Pitch: 0.6303991079330444
Target Frame: <Fixed Frame>
Yaw: 4.308587074279785
Saved: ~
Window Geometry:
Displays:
collapsed: false
Height: 846
Hide Left Dock: false
Hide Right Dock: true
QMainWindow State: 000000ff00000000fd000000040000000000000156000002b4fc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003b000002b4000000c700fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f000002b0fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003d000002b0000000a000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004b00000003efc0100000002fb0000000800540069006d00650100000000000004b00000031600fffffffb0000000800540069006d0065010000000000000450000000000000000000000354000002b400000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
collapsed: false
Tool Properties:
collapsed: false
Views:
collapsed: true
Width: 1200
X: 4059
Y: 514
35 changes: 35 additions & 0 deletions aerial_robot_dynamics/include/aerial_robot_dynamics/math_utils.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#pragma once

#include <Eigen/Dense>
#include <vector>

namespace aerial_robot_dynamics
{
inline void addNoise(Eigen::VectorXd& vec, double sigma)
{
std::default_random_engine generator(std::random_device{}());
std::normal_distribution<double> distribution(0.0, sigma);
for (int i = 0; i < vec.size(); ++i)
{
vec(i) += distribution(generator);
}
}

inline Eigen::MatrixXd tensorContraction(const std::vector<Eigen::MatrixXd>& tensor1, const Eigen::VectorXd& vector1)
{
for (int i = 0; i < tensor1.size(); i++)
{
if (tensor1.at(i).cols() != vector1.size())
{
throw std::invalid_argument("Tensor and vector dimensions do not match.");
}
}

Eigen::MatrixXd ret = Eigen::MatrixXd::Zero(tensor1.at(0).rows(), tensor1.size());
for (int i = 0; i < tensor1.size(); i++)
{
ret.col(i) = tensor1.at(i) * vector1;
}
return ret;
}
} // namespace aerial_robot_dynamics
Loading
Loading