Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
config/simulation.rviz
.gitignore
.vscode
build
build
install
log
52 changes: 52 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
cmake_minimum_required(VERSION 3.8)
project(mavswarm2)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(Armadillo REQUIRED)
find_package(GSL REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(simulator_interfaces REQUIRED)
find_package(std_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(visualization_msgs REQUIRED)
find_package(tf2 REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(glog REQUIRED)

add_executable(mavswarm2 src/quadrotor.cpp)

ament_target_dependencies(mavswarm2
rclcpp
geometry_msgs
tf2
tf2_ros
visualization_msgs
simulator_interfaces
)

target_link_libraries(mavswarm2
GSL::gsl
GSL::gslcblas
glog::glog
)

install(
TARGETS mavswarm2
DESTINATION lib/${PROJECT_NAME}
)
install(
DIRECTORY launch config cf_description
DESTINATION share/${PROJECT_NAME}/
)

include_directories(
include/${PROJECT_NAME}
${EIGEN3_INCLUDE_DIRS}
)

ament_package()
6 changes: 3 additions & 3 deletions ...lator/cf_description/crazyflie.urdf.xacro → cf_description/crazyflie.urdf.xacro
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0"?>

<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="crazyflie">
<xacro:arg name="robot_id" default="0"/>

<link name="base_link$(arg robot_id)">
<link name="base_link">
<visual>
<origin xyz="0 0 0" rpy="4.71 0 0" />
<geometry>
<mesh filename="package://multi_uav_simulator/cf_description/crazyflie2.dae"/>
<mesh filename="package://mavswarm2/cf_description/crazyflie2.dae"/>
</geometry>
</visual>
</link>
Expand Down
2 changes: 1 addition & 1 deletion ...v_simulator/cf_description/crazyflie2.dae → cf_description/crazyflie2.dae
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</contributor>
<created>2016-04-29T11:06:01Z</created>
<modified>2016-04-29T11:06:01Z</modified>
<unit meter="0.00200" name="millimeter"/>
<unit meter="0.00500" name="millimeter"/>
<up_axis>Z_UP</up_axis>
</asset>
<library_geometries>
Expand Down
15 changes: 15 additions & 0 deletions config/crazyflie_params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**:
ros__parameters:
controller_gains: [1.0, 0.5, 0.0015, 0.00075]
# kx: 1
# kv: 0.5
# kr: 0.0015
# komega: 0.00075

model:
J: [2.3951e-5, 2.3951e-5, 3.2347e-5]
m: 0.032
d: 0.08
ctf: 0.0037
gravity: 9.81

32 changes: 32 additions & 0 deletions config/initial_conditions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# define the initial positions of each robot in NWU frame
# change the initial rotation matrix to [1, 0, 0, 0, 1, 0, 0, 0, 1] for initialing the
# drones right side up.
robot_1:
position: [0, 0, -10]
velocity: [0, 0, 0]
rotation: [1, 0, 0, 0, 1, 0, 0, 0, 1]
omega: [0, 0, 0]

# robot_2:
# position: [-2, -2, -2]
# velocity: [0, 0, 0]
# rotation: [1, 0, 0, 0, -0.9995, -0.0314, 0, 0.0314, -0.9995]
# omega: [0, 0, 0]

# robot_3:
# position: [-1, 1, -2]
# velocity: [0, 0, 0]
# rotation: [1, 0, 0, 0, -0.9995, -0.0314, 0, 0.0314, -0.9995]
# omega: [0, 0, 0]

# robot_4:
# position: [1, -1, -2]
# velocity: [0, 0, 0]
# rotation: [1, 0, 0, 0, -0.9995, -0.0314, 0, 0.0314, -0.9995]
# omega: [0, 0, 0]

# robot_5:
# position: [0, 0, -2]
# velocity: [0, 0, 0]
# rotation: [1, 0, 0, 0, -0.9995, -0.0314, 0, 0.0314, -0.9995]
# omega: [0, 0, 0]
77 changes: 77 additions & 0 deletions config/initial_conditions_2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# define the initial positions of each robot in NWU frame
# change the initial rotation matrix to [1, 0, 0, 0, 1, 0, 0, 0, 1] for initialing the
# drones right side up.
# "/**/robot_0" matches the node whether it is namespaced (e.g. /mavswarm2/robot_0
# when started from the launch file) or run bare as /robot_0. A plain "robot_0:" key
# does NOT match a namespaced node, which silently drops these params.
#
# Line formation along +y, spaced 1.0 m, centred symmetrically about y = 0.
/**/robot_0:
ros__parameters:
position: [2.0, -4.5, 2.0]
velocity: [0.0, 0.0, 0.0]
rotation: [1.0, 0.0, 0.0, 0.0, -0.9995, -0.0314, 0.0, 0.0314, -0.9995]
omega: [0.0, 0.0, 0.0]

/**/robot_1:
ros__parameters:
position: [2.0, -3.5, 2.0]
velocity: [0.0, 0.0, 0.0]
rotation: [1.0, 0.0, 0.0, 0.0, -0.9995, -0.0314, 0.0, 0.0314, -0.9995]
omega: [0.0, 0.0, 0.0]

/**/robot_2:
ros__parameters:
position: [2.0, -2.5, 2.0]
velocity: [0.0, 0.0, 0.0]
rotation: [1.0, 0.0, 0.0, 0.0, -0.9995, -0.0314, 0.0, 0.0314, -0.9995]
omega: [0.0, 0.0, 0.0]

/**/robot_3:
ros__parameters:
position: [2.0, -1.5, 2.0]
velocity: [0.0, 0.0, 0.0]
rotation: [1.0, 0.0, 0.0, 0.0, -0.9995, -0.0314, 0.0, 0.0314, -0.9995]
omega: [0.0, 0.0, 0.0]

/**/robot_4:
ros__parameters:
position: [2.0, -0.5, 2.0]
velocity: [0.0, 0.0, 0.0]
rotation: [1.0, 0.0, 0.0, 0.0, -0.9995, -0.0314, 0.0, 0.0314, -0.9995]
omega: [0.0, 0.0, 0.0]

/**/robot_5:
ros__parameters:
position: [2.0, 0.5, 2.0]
velocity: [0.0, 0.0, 0.0]
rotation: [1.0, 0.0, 0.0, 0.0, -0.9995, -0.0314, 0.0, 0.0314, -0.9995]
omega: [0.0, 0.0, 0.0]

/**/robot_6:
ros__parameters:
position: [2.0, 1.5, 2.0]
velocity: [0.0, 0.0, 0.0]
rotation: [1.0, 0.0, 0.0, 0.0, -0.9995, -0.0314, 0.0, 0.0314, -0.9995]
omega: [0.0, 0.0, 0.0]

/**/robot_7:
ros__parameters:
position: [2.0, 2.5, 2.0]
velocity: [0.0, 0.0, 0.0]
rotation: [1.0, 0.0, 0.0, 0.0, -0.9995, -0.0314, 0.0, 0.0314, -0.9995]
omega: [0.0, 0.0, 0.0]

/**/robot_8:
ros__parameters:
position: [2.0, 3.5, 2.0]
velocity: [0.0, 0.0, 0.0]
rotation: [1.0, 0.0, 0.0, 0.0, -0.9995, -0.0314, 0.0, 0.0314, -0.9995]
omega: [0.0, 0.0, 0.0]

/**/robot_9:
ros__parameters:
position: [2.0, 4.5, 2.0]
velocity: [0.0, 0.0, 0.0]
rotation: [1.0, 0.0, 0.0, 0.0, -0.9995, -0.0314, 0.0, 0.0314, -0.9995]
omega: [0.0, 0.0, 0.0]
Binary file removed cover.gif
Binary file not shown.
Binary file added cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cover2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 0 additions & 30 deletions geo_controller/CMakeLists.txt

This file was deleted.

Loading