Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roboclaw ESC driver #22215

Merged
merged 27 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f5489b0
ported roboclaw driver from older commits into newest develop branch
PerFrivik Oct 4, 2023
3bf9122
Roboclaw: Temporary fix, enabling driver to run
PerFrivik Oct 9, 2023
29c1270
Driving possible
MaEtUgR Dec 14, 2021
3aefa72
Roboclaw: Added DutyCycle command in Roboclaw destructor to turn off …
PerFrivik Oct 10, 2023
f09878f
Roboclaw: Working temporary version that drives around
PerFrivik Oct 10, 2023
7682456
Roboclaw: Replaced setDutyCycle with setMotorSpeed to allow for encod…
PerFrivik Oct 11, 2023
2dc976e
Roboclaw: Initial cleanup, next commit will be refactor removing the …
PerFrivik Oct 11, 2023
18416e8
Roboclaw: rough refactor, removed repetitive code, simplified and cla…
PerFrivik Oct 11, 2023
8d39d63
Roboclaw: Fixed issue when power cylcing the roboclaw where the drive…
PerFrivik Oct 12, 2023
51ed2aa
Roboclaw: Integrated OutputModuleInterface including a large code ref…
PerFrivik Nov 10, 2023
4edc4ed
Update msg/CMakeLists.txt
PerFrivik Nov 10, 2023
5e9ed2d
Delete msg/ActuatorControls.msg
PerFrivik Nov 10, 2023
d9daaa9
Update WheelEncoders.msg
PerFrivik Nov 10, 2023
1136999
Update RoverPositionControl.cpp
PerFrivik Nov 10, 2023
b56fc3a
RoboClaw: fix style
MaEtUgR Nov 13, 2023
18b1590
RoboClaw: declutter, make it compile again
MaEtUgR Nov 13, 2023
b6999c2
Roboclaw: move parameters to module.yaml
MaEtUgR Nov 14, 2023
627244e
Rename RoboClaw -> Roboclaw
MaEtUgR Nov 14, 2023
00ca59c
Roboclaw: major cleanup
MaEtUgR Nov 14, 2023
aa1366d
Roboclaw: Consistent Left & Right naming convertion with Differential…
PerFrivik Nov 15, 2023
74e103b
Roboclaw: Updated Airframe and fixed left and right mapping error
PerFrivik Nov 15, 2023
ea96cc5
Roboclaw: Accidentally removed a parameter
PerFrivik Nov 15, 2023
6939bfd
Roboclaw: Changes in r1 airframe, removed hardcoded port configurations
PerFrivik Nov 20, 2023
ce8123a
Roboclaw: Updated yaml file to support Roboclaw Driver in QGC
PerFrivik Nov 20, 2023
c9bf3e2
Roboclaw: Fix CI pr issue
PerFrivik Nov 28, 2023
2baf4a6
Roboclaw: Fixed issue where parameters had different prefixes
PerFrivik Nov 28, 2023
f06b931
Roboclaw: Updated parameter prefix for roboclaw output module
PerFrivik Nov 28, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

. ${R}etc/init.d/rc.rover_defaults



param set-default BAT1_N_CELLS 4

param set-default EKF2_GBIAS_INIT 0.01
Expand Down Expand Up @@ -52,10 +54,9 @@ param set-default GND_MAX_ANG 3.1415
# Set geometry & output configration
param set-default CA_AIRFRAME 6
param set-default CA_R_REV 3
param set-default PWM_MAIN_FUNC1 101
param set-default PWM_MAIN_FUNC2 102
param set-default PWM_MAIN_DIS1 1500
param set-default PWM_MAIN_DIS2 1500
param set-default PWM_MAIN_TIM0 50
param set-default PWM_MAIN_TIM1 50


param set-default RBCLW_ADDRESS 128
param set-default RBCLW_FUNC1 101
param set-default RBCLW_FUNC2 102
param set-default RBCLW_REV 1
1 change: 1 addition & 0 deletions boards/px4/fmu-v5x/default.px4board
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ CONFIG_DRIVERS_CAMERA_TRIGGER=y
CONFIG_COMMON_DIFFERENTIAL_PRESSURE=y
CONFIG_COMMON_DISTANCE_SENSOR=y
CONFIG_DRIVERS_DSHOT=y
CONFIG_DRIVERS_ROBOCLAW=y
CONFIG_DRIVERS_GPIO_MCP23009=y
CONFIG_DRIVERS_GPS=y
CONFIG_DRIVERS_HEATER=y
Expand Down
1 change: 1 addition & 0 deletions msg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ set(msg_files
VehicleTrajectoryBezier.msg
VehicleTrajectoryWaypoint.msg
VtolVehicleStatus.msg
WheelEncoders.msg
Wind.msg
YawEstimatorStatus.msg
)
Expand Down
5 changes: 5 additions & 0 deletions msg/WheelEncoders.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
uint64 timestamp # time since system start (microseconds)

# Two wheels: 0 right, 1 left
float32[2] wheel_speed # [rad/s]
float32[2] wheel_angle # [rad]
43 changes: 43 additions & 0 deletions src/drivers/roboclaw/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
############################################################################
#
# Copyright (c) 2015-2023 PX4 Development Team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name PX4 nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################

px4_add_module(
MODULE drivers__roboclaw
MAIN roboclaw
COMPILE_FLAGS
SRCS
Roboclaw.cpp
MODULE_CONFIG
module.yaml
)

5 changes: 5 additions & 0 deletions src/drivers/roboclaw/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
menuconfig DRIVERS_ROBOCLAW
bool "roboclaw"
default n
---help---
Enable support for roboclaw
Loading
Loading