Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
37bf72e
kr_mav_msgs ROS2 compatible
pranavpshah Feb 14, 2024
cef46f6
kr_tracker_msgs ROS2 humble compatible
pranavpshah Feb 14, 2024
d8b9dfb
cmake version 3.8->3.10
pranavpshah Feb 15, 2024
a11c87d
Merge pull request #158 from KumarRobotics/devel/humble_pranav
fcladera Feb 16, 2024
4f8cfd9
mesh visualization in ROS2 humble
pranavpshah Feb 16, 2024
90d2eab
parameter for message type
pranavpshah Feb 17, 2024
97a724c
format edit
pranavpshah Feb 17, 2024
ae30583
Merge pull request #159 from KumarRobotics/devel/humble_pranav
fcladera Feb 17, 2024
17578ec
Merge pull request #162 from KumarRobotics/master
fcladera Mar 12, 2024
cc30c14
kr_mav_controllers ROS2 humble compatible
pranavpshah Mar 13, 2024
64981e4
Disable failing cpplint tests that conflict with coding style
fcladera Mar 13, 2024
cdde203
cpplint compliant changes
pranavpshah Mar 13, 2024
2aa814e
refined comments
pranavpshah Mar 14, 2024
e5fbc6c
removed colcon test block
pranavpshah Mar 15, 2024
a053d90
rqt gui and crazyflie interface ros2 compatible
pranavpshah Mar 25, 2024
f9962e9
update maintainers
pranavpshah Mar 25, 2024
39ae768
update version to 0.2.0
pranavpshah Mar 27, 2024
8b8e6bb
kr_trackers ros2 humble compatible
pranavpshah Oct 5, 2024
2b825b4
Merge remote-tracking branch 'origin/master' into devel/humble_pranav
pranavpshah Oct 5, 2024
460e403
[WIP]: kr_trackers_manager ros2 compatible
pranavpshah Oct 5, 2024
7f8f040
kr_mav_manager migrated to ROS2 humble format
pranavpshah Oct 18, 2024
426e0e4
removed unneccessary AddTwoInts Dev test
kashishkebab9 Jan 28, 2025
7a31c07
integration init commit
kashishkebab9 Feb 4, 2025
984a080
cleaned up namespacing
kashishkebab9 Feb 4, 2025
f284cff
namespacing figured out
kashishkebab9 Feb 5, 2025
1d1deb7
namespacing cleared,we might be go for hardware/simulator integration
kashishkebab9 Feb 5, 2025
f297138
mav services can find trackers now
kashishkebab9 Feb 6, 2025
2567dc8
for some reason there is an immediate segfault from motors_on
kashishkebab9 Feb 6, 2025
dacb4ed
finally got client and subscriber working together
kashishkebab9 Feb 11, 2025
1ba4740
changes for debugging
kashishkebab9 Feb 14, 2025
a983f53
fixed synchronous service call in transition function
pranavpshah Feb 22, 2025
77fb8ca
almost got motors spinning, need so3 controller
kashishkebab9 Mar 18, 2025
8a3ec91
spinning motors!
kashishkebab9 Mar 18, 2025
e6b8851
fixed takeoff clock issue
kashishkebab9 Mar 19, 2025
8e97a7e
various issues fixed, still not taking off
kashishkebab9 Mar 19, 2025
8a52b17
fixed race condition, new issue for takeoff
kashishkebab9 Mar 24, 2025
c942640
save before switching drones
kashishkebab9 Mar 25, 2025
b2ee362
drone now takes off on motors on
kashishkebab9 Mar 25, 2025
fe61e7a
WE TOOK OFF
kashishkebab9 Mar 25, 2025
bfa0f57
fixed take off, mass was off, onto goto
kashishkebab9 Mar 27, 2025
c9b966c
working goto and land
kashishkebab9 Mar 28, 2025
ca9c2d6
Initial ros2 port of sbus_interface
ongdexter Jul 1, 2025
abdf1e2
Fixed logger to sbus_bridge
ongdexter Jul 8, 2025
2def3a0
Fixed ros2 clock
ongdexter Jul 9, 2025
f57367f
Updated sbus_interface launch file for VIO flight
ongdexter Aug 4, 2025
c25090a
First cut betaflight_interface
ongdexter Sep 12, 2025
b88d0c7
Working betaflight_interface
ongdexter Sep 15, 2025
e09f446
Removed sbus_interface
ongdexter Oct 10, 2025
cb1e813
Fixed namespaced relative topics
ongdexter Oct 10, 2025
3b26130
Cleaned up some config and namespace issues
ongdexter Oct 10, 2025
33f8b42
Updated arg
ongdexter Oct 10, 2025
fb0f6e7
Fixed param arg
ongdexter Oct 10, 2025
93a92b1
Removed build test
ongdexter Oct 10, 2025
709eb10
Added poly tracker
ongdexter Oct 14, 2025
a7b4d63
Fixed odom topics, updated vicon launch
ongdexter Oct 15, 2025
dcb105b
Added bridge_armed_ mutex lock
ongdexter Oct 15, 2025
c724a81
Switched back to control_odom
ongdexter Oct 15, 2025
9919308
Updated gains
ongdexter Oct 15, 2025
50f7a00
Renamed gains file
ongdexter Oct 15, 2025
3aee995
Updates to polytracker
ongdexter Oct 23, 2025
200b21c
Added polytracker services
ongdexter Oct 23, 2025
41e6647
Removed debug logging
ongdexter Oct 23, 2025
6a69458
Fixed indent
ongdexter Oct 24, 2025
b806c58
Fixed polytracker indent
ongdexter Oct 25, 2025
39e85d6
Added ros2 velocity tracker
ongdexter Oct 30, 2025
b88867d
Added yaw error tracking in velocity tracker
ongdexter Nov 5, 2025
7503f28
Updated new nf motors
ongdexter Mar 5, 2026
637ff20
Updated robot namespace
ongdexter Mar 5, 2026
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
105 changes: 105 additions & 0 deletions '
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
from launch import LaunchDescription
from launch_ros.actions import Node
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch_ros.substitutions import FindPackageShare
from launch_ros.actions import ComposableNodeContainer
from launch_ros.descriptions import ComposableNode
import os
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.actions import GroupAction
from launch_ros.actions import PushRosNamespace

def generate_launch_description():

ld = LaunchDescription()
odom_topic = LaunchConfiguration('odom')
so3_cmd_topic = LaunchConfiguration('so3_cmd')

robot_arg = DeclareLaunchArgument(
'robot', default_value='quadrotor'
)
odom_arg = DeclareLaunchArgument(
'odom', default_value='odom'
)
so3_cmd_arg = DeclareLaunchArgument(
'so3_cmd', default_value='so3_cmd'
)

# Path to the configuration file
config_file = FindPackageShare('kr_crazyflie_interface').find('kr_crazyflie_interface') + '/config/crazyflie.yaml'

mav_services_node = Node(
package="kr_mav_manager",
executable="mav_services",
namespace=LaunchConfiguration('robot'),
name="mav_services",
output='screen'
)

rqt_gui_node = Node(
package="rqt_mav_manager",
executable="rqt_mav_manager",
namespace=LaunchConfiguration('robot'),
name="rqt_mav",
output='screen',
)

trackers_manager_config_file = FindPackageShare('kr_trackers_manager').find('kr_trackers_manager') + '/config/trackers_manager.yaml'
print(trackers_manager_config_file)

trackers_manager_launch_path = os.path.join(
FindPackageShare('kr_trackers_manager').find('kr_trackers_manager'),
'launch',
'example.launch.py'
)

# Include the trackers manager launch file
trackers_component = IncludeLaunchDescription(
PythonLaunchDescriptionSource(trackers_manager_launch_path),
launch_arguments={
'trackers_manager_config_file': config_file
}.items()
)

trackers_component_with_namespace = GroupAction(
actions=[
PushRosNamespace(LaunchConfiguration('robot')),
trackers_component,
]
)

# Component configuration
so3cmd_to_crazyflie_component = ComposableNodeContainer(
name="so3_container",
namespace=LaunchConfiguration('robot'),
package="rclcpp_components",
executable="component_container",
composable_node_descriptions=[
ComposableNode(
package="kr_crazyflie_interface",
plugin="SO3CmdToCrazyflie",
name="so3cmd_to_crazyflie",
parameters=[config_file],
remappings=[
("~/odom", odom_topic),
("~/so3_cmd", so3_cmd_topic)
]
)
],
output='screen'
)
# Regular Node (not in container)


return LaunchDescription([
robot_arg,
# odom_arg,
# so3_cmd_arg,
# so3cmd_to_crazyflie_component,
# mav_services_node,
# rqt_gui_node,
trackers_component_with_namespace,

])
42 changes: 0 additions & 42 deletions .github/workflows/build_and_test.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/cpplint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
,-whitespace/braces\
,-whitespace/parens\
,-whitespace/newline\
,-build/header_guard\
,-readability/todo\
,-build/c++11"
# -readability/braces\
# ,-whitespace/comments\
Expand Down
68 changes: 68 additions & 0 deletions interfaces/kr_betaflight_interface/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
cmake_minimum_required(VERSION 3.10)
project(kr_betaflight_interface)

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

include_directories(
include
${CMAKE_CURRENT_SOURCE_DIR}/include
)

find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(nav_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(kr_mav_msgs REQUIRED)
find_package(rclcpp_components REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(tf2 REQUIRED)

add_library(${PROJECT_NAME} SHARED
src/so3cmd_to_betaflight_component.cpp
src/crsf/crsf_bridge.cpp
src/crsf/crsf_msg.cpp
src/crsf/crsf_serial_port.cpp
src/sbus/sbus_bridge.cpp
src/sbus/sbus_msg.cpp
src/sbus/sbus_serial_port.cpp
)
ament_target_dependencies(${PROJECT_NAME}
rclcpp
rclcpp_components
kr_mav_msgs
nav_msgs
sensor_msgs
geometry_msgs
tf2)
target_link_libraries(${PROJECT_NAME} Eigen3::Eigen)
rclcpp_components_register_nodes(${PROJECT_NAME} "SO3CmdToBetaflight")

# Install headers
install(
DIRECTORY include/
DESTINATION include
)

install(DIRECTORY
launch
config
DESTINATION share/${PROJECT_NAME}
)

install(TARGETS
${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)

target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)

ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS})
ament_package()
34 changes: 34 additions & 0 deletions interfaces/kr_betaflight_interface/config/neurofly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
port_name: /dev/ttyTHS1
protocol_type: crsf # crsf, sbus
control_command_timeout: 0.5 # [s] (Must be larger than 'state_estimate_timeout'
# set in the 'flight_controller'!)
rc_timeout: 0.1 # [s]
disable_thrust_mapping: true
use_body_rates: false

## fpvcycle 2206 motors 4S
# thrust_vs_rpm_cof_a_: 1.755e-06 # gf
# thrust_vs_rpm_cof_b_: -6.521e-03 # gf
# thrust_vs_rpm_cof_c_: 1.388e+01 # gf
thrust_vs_rpm_cof_a_: 1.72106707e-8 # N
thrust_vs_rpm_cof_b_: -0.00006394916 # N
thrust_vs_rpm_cof_c_: 0.136116302 # N
rpm_vs_throttle_linear_coeff_a_: 2.89518953e+01
rpm_vs_throttle_linear_coeff_b_: -3.04658581e+04
rpm_vs_throttle_quadratic_coeff_a_: -2.13455563e-02
rpm_vs_throttle_quadratic_coeff_b_: 9.61348839e+01
rpm_vs_throttle_quadratic_coeff_c_: -8.20339135e+04

# Maximum values for body rates and roll and pitch angles as they are set
# on the Flight Controller. The max roll an pitch angles are only active
# when flying in angle mode
max_roll_rate: 1000.0 # [deg/s]
max_pitch_rate: 1000.0 # [deg/s]
max_yaw_rate: 1000.0 # [deg/s]
max_roll_angle: 50.0 # [deg]
max_pitch_angle: 50.0 # [deg]
alpha_vbat_filter: 0.01
perform_thrust_voltage_compensation: false
thrust_ratio_voltage_map_a: -0.17044342 # [1/V]
thrust_ratio_voltage_map_b: 3.10495276 # [-]
n_lipo_cells: 3 # [-]
35 changes: 35 additions & 0 deletions interfaces/kr_betaflight_interface/config/neurofly_1804.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
port_name: /dev/ttyTHS1
protocol_type: crsf # crsf, sbus
control_command_timeout: 0.5 # [s] (Must be larger than 'state_estimate_timeout'
# set in the 'flight_controller'!)
rc_timeout: 0.1 # [s]
mass: 0.68 # [kg]
disable_thrust_mapping: true
use_body_rates: false

## hyperlite 1804 motors 4S
# thrust_vs_rpm_cof_a_: 1.338e-06 # gf
# thrust_vs_rpm_cof_b_: -4.472e-3 # gf
# thrust_vs_rpm_cof_c_: 8.051 # gf
thrust_vs_rpm_cof_a_: 1.31212977e-08 # N
thrust_vs_rpm_cof_b_: -4.38553e-05 # N
thrust_vs_rpm_cof_c_: 7.89533392e-02 # N
rpm_vs_throttle_linear_coeff_a_: 17.6
rpm_vs_throttle_linear_coeff_b_: -15875.0
rpm_vs_throttle_quadratic_coeff_a_: -30169.81
rpm_vs_throttle_quadratic_coeff_b_: 35.43775
rpm_vs_throttle_quadratic_coeff_c_: -0.004962819

# Maximum values for body rates and roll and pitch angles as they are set
# on the Flight Controller. The max roll an pitch angles are only active
# when flying in angle mode
max_roll_rate: 1000.0 # [deg/s]
max_pitch_rate: 1000.0 # [deg/s]
max_yaw_rate: 1000.0 # [deg/s]
max_roll_angle: 50.0 # [deg]
max_pitch_angle: 50.0 # [deg]
alpha_vbat_filter: 0.01
perform_thrust_voltage_compensation: false
thrust_ratio_voltage_map_a: -0.17044342 # [1/V]
thrust_ratio_voltage_map_b: 3.10495276 # [-]
n_lipo_cells: 3 # [-]
32 changes: 32 additions & 0 deletions interfaces/kr_betaflight_interface/config/neurofly_gains.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# neurofly1
quadrotor_name: neurofly1
mass: 0.68

kp_x: 6.0
kp_y: 6.0
kp_z: 8.0
kd_x: 3.0
kd_y: 3.0
kd_z: 3.5
ki_x: 0.00
ki_y: 0.00
ki_z: 0.00

kib_x: 0.00
kib_y: 0.00
kib_z: 0.00

rot_x: 1.2
rot_y: 1.2
rot_z: 1.0

ang_x: 0.13
ang_y: 0.13
ang_z: 0.1

kf_correction: 0.0e-08
roll_correction: 0.0
pitch_correction: 0.0

max_pos_int: 0.3
max_pos_int_b: 0.3
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# This should contain tracker parameters

line_tracker_distance:
default_v_des: 1.0
default_a_des: 0.5
default_v_des: 0.2
default_a_des: 0.2
epsilon: 0.1

line_tracker_min_jerk:
default_v_des: 1.0
default_a_des: 0.5
default_yaw_v_des: 0.8
default_yaw_a_des: 0.2
default_yaw_v_des: 0.4
default_yaw_a_des: 0.3

trajectory_tracker:
max_vel_des: 0.5
max_acc_des: 0.3
max_vel_des: 2.0
max_acc_des: 2.0

velocity_tracker:
timeout: 0.5
Expand Down
10 changes: 10 additions & 0 deletions interfaces/kr_betaflight_interface/config/trackers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/neurofly1/trackers_manager:
ros__parameters:
trackers: ["NullTracker", "LineTrackerDistance", "LineTrackerMinJerk", "PolyTracker"]
line_tracker_distance/default_v_des: 0.2
line_tracker_distance/default_a_des: 0.2
line_tracker_distance/epsilon: 0.1
line_tracker_min_jerk/default_v_des: 1.0
line_tracker_min_jerk/default_a_des: 0.5
line_tracker_min_jerk/default_yaw_v_des: 0.4
line_tracker_min_jerk/default_yaw_a_des: 0.3
Loading