Skip to content

Commit

Permalink
Merge pull request #525 from tongtybj/develop/robot_model
Browse files Browse the repository at this point in the history
[Robot Model] refactor the robot modelling framework
  • Loading branch information
tongtybj committed Jul 1, 2023
2 parents e1a4533 + 8096f1f commit fa7596c
Show file tree
Hide file tree
Showing 38 changed files with 1,544 additions and 1,156 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <aerial_robot_control/control/control_base.h>
#include <aerial_robot_control/flight_navigation.h>
#include <aerial_robot_estimation/state_estimation.h>
#include <aerial_robot_model/transformable_aerial_robot_model_ros.h>
#include <aerial_robot_model/model/aerial_robot_model_ros.h>

using namespace std;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

#include <aerial_robot_control/flight_navigation.h>
#include <aerial_robot_estimation/state_estimation.h>
#include <aerial_robot_model/transformable_aerial_robot_model.h>
#include <aerial_robot_model/model/aerial_robot_model.h>
#include <ros/ros.h>
#include <spinal/PwmInfo.h>
#include <spinal/UavInfo.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

#pragma once

#include <aerial_robot_model/transformable_aerial_robot_model.h>
#include <aerial_robot_model/model/aerial_robot_model.h>
#include <aerial_robot_msgs/States.h>
#include <array>
#include <assert.h>
Expand Down
35 changes: 21 additions & 14 deletions aerial_robot_model/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ generate_messages(

catkin_package(
INCLUDE_DIRS include test
LIBRARIES transformable_aerial_robot_model transformable_aerial_robot_model_ros numerical_jacobians
LIBRARIES aerial_robot_model aerial_robot_model_ros numerical_jacobians robot_model_pluginlib
CATKIN_DEPENDS eigen_conversions geometry_msgs interactive_markers kalman_filter kdl_parser message_runtime pluginlib sensor_msgs spinal std_msgs tf tf_conversions tf2_eigen tf2_geometry_msgs tf2_kdl tf2_ros tf_conversions urdf visualization_msgs
DEPENDS orocos_kdl urdfdom_headers
)
Expand All @@ -73,17 +73,24 @@ include_directories(
${EIGEN3_INCLUDE_DIRS}
)

add_library(transformable_aerial_robot_model
src/transformable_aerial_robot_model/robot_model.cpp
src/transformable_aerial_robot_model/jacobians.cpp
src/transformable_aerial_robot_model/kinematics.cpp
src/transformable_aerial_robot_model/stability.cpp
src/transformable_aerial_robot_model/statics.cpp)
target_link_libraries(transformable_aerial_robot_model ${catkin_LIBRARIES} ${orocos_kdl_LIBRARIES} ${EIGEN3_LIBRARIES})

add_library(transformable_aerial_robot_model_ros src/transformable_aerial_robot_model/robot_model_ros.cpp)
target_link_libraries(transformable_aerial_robot_model_ros transformable_aerial_robot_model ${catkin_LIBRARIES} ${orocos_kdl_LIBRARIES} ${EIGEN3_LIBRARIES})
add_dependencies(transformable_aerial_robot_model_ros ${PROJECT_NAME}_generate_messages_cpp spinal_generate_messages_cpp)
add_library(aerial_robot_model
src/model/base_model/robot_model.cpp
src/model/transformable_model/robot_model.cpp
src/model/transformable_model/jacobians.cpp
src/model/transformable_model/kinematics.cpp
src/model/transformable_model/stability.cpp
src/model/transformable_model/statics.cpp)
target_link_libraries(aerial_robot_model ${catkin_LIBRARIES} ${orocos_kdl_LIBRARIES} ${EIGEN3_LIBRARIES})

add_library(aerial_robot_model_ros src/model/base_model/robot_model_ros.cpp)
target_link_libraries(aerial_robot_model_ros aerial_robot_model ${catkin_LIBRARIES} ${orocos_kdl_LIBRARIES} ${EIGEN3_LIBRARIES})
add_dependencies(aerial_robot_model_ros ${PROJECT_NAME}_generate_messages_cpp spinal_generate_messages_cpp)

add_library(robot_model_pluginlib
src/model/plugin/multirotor_robot_model.cpp
src/model/plugin/tilted_underactuated_robot_model.cpp)
target_link_libraries(robot_model_pluginlib ${catkin_LIBRARIES} aerial_robot_model)

add_library(servo_bridge src/servo_bridge/servo_bridge.cpp)
target_link_libraries(servo_bridge ${catkin_LIBRARIES})
Expand All @@ -98,21 +105,21 @@ target_link_libraries(interactive_marker_tf_broadcaster ${catkin_LIBRARIES})

## for rostest
add_library(numerical_jacobians test/aerial_robot_model/numerical_jacobians.cpp)
target_link_libraries(numerical_jacobians transformable_aerial_robot_model ${catkin_LIBRARIES})
target_link_libraries(numerical_jacobians aerial_robot_model ${catkin_LIBRARIES})


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

install(TARGETS transformable_aerial_robot_model transformable_aerial_robot_model_ros servo_bridge numerical_jacobians
install(TARGETS aerial_robot_model aerial_robot_model_ros robot_model_pluginlib servo_bridge numerical_jacobians
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)

install(TARGETS rotor_tf_publisher interactive_marker_tf_broadcaster servo_bridge_node
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

install(DIRECTORY launch script
install(DIRECTORY launch script plugins
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
USE_SOURCE_PERMISSIONS
)
Loading

0 comments on commit fa7596c

Please sign in to comment.