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

Ackermann odometry library #3

Open
wants to merge 197 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 72 commits
Commits
Show all changes
197 commits
Select commit Hold shift + click to select a range
2c744de
created pkg and setup controller from templates rtw
Nov 13, 2022
e3be21f
recreated controller setup outside docker to use rtw branch with ref_…
Nov 13, 2022
c9b1dad
modified .yaml and controller methods content
Nov 13, 2022
568f723
added odometry.hpp
Nov 13, 2022
29ef5f8
modified namespace of odometry.hpp and added odometry.cpp
Nov 13, 2022
2671377
spotted issue with namespace naming (has xyz_ros2 when namespace eve…
Nov 13, 2022
9181e18
corrected the copy paste error in the .yaml file which created the _r…
Nov 13, 2022
ff4c3b9
added tests yet to debug few tests
Nov 14, 2022
a1cb0bc
Corrected formatting.
destogl Nov 14, 2022
afe5006
Delete services and comment out to compile.
destogl Nov 14, 2022
222a40d
Make compilable on humble.
destogl Nov 14, 2022
72c3ca1
Correct interfaces in ackerman controllers.
destogl Nov 15, 2022
d81513c
all tests pass
Nov 15, 2022
82e7cf2
added test_time_stamp_zero test
Nov 15, 2022
4d7fa99
ackermann odometry
petkovich Nov 17, 2022
6e9a519
template state publisher
petkovich Nov 17, 2022
8544e3c
interfaces check
Nov 17, 2022
96a5879
removed publish_period related code
Nov 17, 2022
29df374
compiles, tests passed, publish_period removed
Nov 17, 2022
7f36236
state publisher
petkovich Nov 18, 2022
65c69bc
new message published
petkovich Nov 18, 2022
6e52043
added feedback_type() method to choose position or velocity hardware …
Nov 22, 2022
c8cbd28
Code optimization.
destogl Nov 24, 2022
4d6dced
Make controller to compile again.
destogl Nov 24, 2022
4ab177b
added unstamped twist topic -clean commit -functional changes
Nov 28, 2022
8335f95
using only one realtime buffer handle
Nov 28, 2022
dc4a590
Debuging ackermann controller.
destogl Nov 29, 2022
0c54190
updated tests to work with twist and twist_stamped cases
Nov 29, 2022
20f5319
modifid config files
Nov 29, 2022
0c84ca6
modified cmakelists
Nov 29, 2022
c8bbf2c
removed file not needed
Nov 29, 2022
fcd3cb4
odom lib creation
petkovich Dec 5, 2022
41df037
refrence new library
petkovich Dec 5, 2022
ce0556d
snake case
petkovich Dec 5, 2022
24802b5
steer names as arrays
petkovich Dec 6, 2022
6a17f95
direct kinematics
petkovich Dec 7, 2022
dd1df2c
replaced bacc acumulator with rcpputils
petkovich Dec 8, 2022
7583c99
migrated to steering_controllers package
petkovich Dec 8, 2022
e7c1a83
cleaned warnings
petkovich Dec 8, 2022
931553d
move tricycle, edit ackermann cmakelists
petkovich Dec 8, 2022
de0e531
tricycle uses steering odometry, keeping odom.cpp for comparison, TOD…
petkovich Dec 8, 2022
9f85d4b
cleaned cmakelists, removed tricycle odometry
petkovich Dec 12, 2022
7bce411
affed steering_controllers package, new base class/package
petkovich Dec 13, 2022
1a1f977
namespace, visibility, parameters
petkovich Dec 15, 2022
ad05e0b
inherited steering controller in ackermann src
petkovich Dec 15, 2022
58c36b9
template for modifying update function
petkovich Dec 15, 2022
067e4df
odom configuration separated
petkovich Dec 16, 2022
effee35
function for changing intefrace number
petkovich Dec 16, 2022
59f4c46
Delete LICENSE
destogl Dec 17, 2022
8f6803c
remove custom msg, integrate new msg from control msgs
petkovich Dec 17, 2022
7ba0580
Update steering_controllers/ackermann_steering_controller/CMakeLists.txt
petkovich Dec 17, 2022
ace1ccb
Update steering_controllers/ackermann_steering_controller/CMakeLists.txt
petkovich Dec 17, 2022
4e132fd
cmakelists build and install interfaces
petkovich Dec 18, 2022
8a4d7c0
license and maintainers
petkovich Dec 18, 2022
27332c5
removed ackermann package, integrated with steering controllers
petkovich Dec 18, 2022
6695ad3
renamed ackermann to steering_controller_implementations
petkovich Dec 18, 2022
eed9310
added bicycle controller (the same as ackermann for now)
petkovich Dec 18, 2022
33597a2
removed template from copyright
petkovich Dec 18, 2022
16842f1
removed template from copyright
petkovich Dec 18, 2022
127f834
defines
petkovich Dec 18, 2022
8267fc8
ported tricycle controller
petkovich Dec 18, 2022
da6198f
export tricycle controller
petkovich Dec 18, 2022
e38b79b
named variables for some odom parameters
petkovich Dec 19, 2022
15a2eb6
integration function, trans rot vel to steering angle arguments
petkovich Dec 19, 2022
ef8fbc9
removed redundant classes and variables
petkovich Dec 19, 2022
6c73ecf
removed some more redundant classes and variables
petkovich Dec 19, 2022
61eaf2a
configure_odometry pure virtual
petkovich Dec 19, 2022
eaa0a3c
removed tricycle package, integrated steering odometry with steering …
petkovich Dec 19, 2022
6a87431
removed subfolder
petkovich Dec 19, 2022
c95c7bb
returned configure odometry implementation that returns error, protec…
petkovich Dec 19, 2022
8904ec2
odometry update implementations for bicycle and tricycle, integration…
petkovich Dec 19, 2022
267de9c
Fix command_interface_configuration iterator
petkovich Dec 19, 2022
9364caa
returned tricycle (in root folder)
petkovich Dec 20, 2022
6fae035
separated implementations in files
petkovich Dec 20, 2022
2d86708
remove lint tests
petkovich Dec 20, 2022
4d14b5f
ControllerTwistReferenceMsg, ControllerAckermannReferenceMsg
petkovich Dec 20, 2022
4a910cd
unstamped twist deprecation, ackermann subscriber
petkovich Dec 20, 2022
8586362
authors, maintainers
petkovich Dec 20, 2022
f4a1880
removed rmw_qos_profile_services_hist_keep_all
petkovich Dec 20, 2022
b1a62f4
changed deprecation error
petkovich Dec 20, 2022
d28e2a4
parameters configured in base class, removed some comments
petkovich Dec 20, 2022
9fe998a
doc folder
petkovich Dec 21, 2022
453a534
virtual classes for odometry
petkovich Dec 21, 2022
e46bafa
ackermann odometry implementation
petkovich Dec 21, 2022
4e4d86a
front_wheels_names, rear_wheels_names
petkovich Dec 21, 2022
97ff28c
precommit and control_msgs repos
petkovich Dec 21, 2022
88c6a7b
Merge branch 'master' into ackermann-odometry-library
destogl Dec 21, 2022
821bfd7
separated implementation-specific parameters to implemenation files
petkovich Dec 24, 2022
d711a96
removed comments in odometry
petkovich Dec 24, 2022
d5b66a3
removed multipliers
petkovich Dec 27, 2022
efbaf67
enable rear steering, different wheels radii
petkovich Dec 27, 2022
f295112
changed SteeringControllerStatus
petkovich Dec 28, 2022
d2b87ca
command interfaces for multiple wheels
petkovich Dec 28, 2022
922099e
odometry types
petkovich Dec 29, 2022
599b223
forward kinematics model template
petkovich Dec 29, 2022
da4b41c
command interface always has traction before steering
petkovich Dec 29, 2022
98eba40
configs
petkovich Dec 29, 2022
0e3aa8f
fwd kinematics implementation, TODO ackermann
petkovich Dec 29, 2022
be9c0e1
steer_pos_ in odometry, adjusted names of arguments for update function
petkovich Dec 29, 2022
e4ff91d
Add new package for Bicycle controller.
destogl Jan 3, 2023
4074602
Add new package for Tricycle controller.
destogl Jan 3, 2023
5c5acb3
Add new package for Ackermann controller.
destogl Jan 3, 2023
0a8a264
Correct authors and descriptions.
destogl Jan 3, 2023
cb3e8af
Rename to steering_controllers_library.
destogl Jan 3, 2023
47f6d2e
Bicycle Controller moved to a separate package.
destogl Jan 3, 2023
b9b2e7e
Cleanup some files.
destogl Jan 3, 2023
378d88b
Move Ackermann steering controller to dedicated package.
destogl Jan 3, 2023
952c784
Moved Tricycle controller.
destogl Jan 3, 2023
82f096d
Updated ackermann controller stuff.
destogl Jan 3, 2023
6625551
Small fixes on bicycl eand library.
destogl Jan 3, 2023
04a18d8
tests build
petkovich Jan 4, 2023
3a81c9b
on cofigure test
petkovich Jan 5, 2023
c96a83b
first test finished
petkovich Jan 5, 2023
d645557
exported intefraces
petkovich Jan 7, 2023
73edcce
on activate
petkovich Jan 7, 2023
b723724
on activate
petkovich Jan 7, 2023
32db0c7
publish_commands
petkovich Jan 7, 2023
467a4a5
publish_commands
petkovich Jan 9, 2023
db15472
cleared slow controllers, publishing test subscriber
petkovich Jan 13, 2023
28ffa17
command_interfaces_ don't update
petkovich Jan 13, 2023
067c41d
fixed reference update
petkovich Jan 13, 2023
872ff14
publisher works
petkovich Jan 13, 2023
e0b0665
bicycle finished
petkovich Jan 13, 2023
e0255e0
tricycle params#
petkovich Jan 13, 2023
a9e249a
tricycle tests compile, ready for implementations
petkovich Jan 13, 2023
8a1da69
bicycle uses CMD_DRIVE_WHEEL etc instead of hardcoded numbers
petkovich Jan 13, 2023
c291ea7
tricycle first test, add subscription fails
petkovich Jan 13, 2023
fafcd20
first test passes
petkovich Jan 13, 2023
1840708
try: first test passes
petkovich Jan 13, 2023
38b7dcc
bi&tri: check_exported_intefaces
petkovich Jan 13, 2023
c6b51a0
tri: activate, update, deactivate, reactivate
petkovich Jan 13, 2023
607a774
update logic init tricycle
petkovich Jan 13, 2023
9c0c93f
update logic tricycle
petkovich Jan 13, 2023
ec851ad
tricycle done
petkovich Jan 13, 2023
e63558f
ackermann tests
petkovich Jan 13, 2023
b0adcaa
Delete steering_controllers.xml
destogl Jan 13, 2023
c0d348d
Update ackermann_steering_controller/ackermann_steering_controller.xml
petkovich Jan 16, 2023
cf4b48a
Update ackermann_steering_controller/include/ackermann_steering_contr…
petkovich Jan 16, 2023
a4c37e2
changed state_drive to state_traction
petkovich Jan 16, 2023
006b241
nr itfs in the header
petkovich Jan 16, 2023
7e31f93
ackermann tests cmd interfaces
petkovich Jan 16, 2023
c2849c9
control tricycle constants
petkovich Jan 16, 2023
5198ddd
control bicycle constants
petkovich Jan 16, 2023
e92a4bd
package descriptions, wheelbase param desc
petkovich Jan 16, 2023
304b288
preceeding ackermann
petkovich Jan 16, 2023
cc72efc
tricycle preceeding
petkovich Jan 16, 2023
5dfdf19
bicycle preceeding
petkovich Jan 16, 2023
abf035f
update logic chained
petkovich Jan 17, 2023
f829c45
removed pragma once
petkovich Jan 17, 2023
6368eca
params and cosmetics
petkovich Jan 17, 2023
bed538f
preceeding params and testing
petkovich Jan 17, 2023
9ccf5b2
cosmetic changes
petkovich Jan 17, 2023
5322b56
reset interfaces to nan
petkovich Jan 17, 2023
db764ab
reduce code for controller state publisher
petkovich Jan 17, 2023
29e9015
steering commands for ackermann
petkovich Jan 17, 2023
e2b8eb3
adding ref_timeout update behavior
Jan 18, 2023
5b74105
test header and param
Jan 18, 2023
91e2d2c
test cpp
Jan 18, 2023
83c882e
working tests for steering_controllers_library
Jan 19, 2023
9774c21
reverted to old update_and_write_commands, steering tests do not pass…
petkovich Jan 20, 2023
26772b2
odometry config, some variables renamed
petkovich Jan 20, 2023
797a0ce
cleaned todo
petkovich Jan 26, 2023
38650d4
fixed compile error, exported parameters to include
petkovich Jan 30, 2023
8d46a9a
DESTINATION include/
petkovich Jan 30, 2023
73e32be
Merge branch 'master' into ackermann-odometry-library
destogl Feb 8, 2023
7cd6683
Apply suggestions from code review
destogl Feb 8, 2023
aaf5187
Update ackermann_steering_controller/test/test_ackermann_steering_con…
destogl Feb 8, 2023
2f80658
Update bicycle_steering_controller/src/bicycle_steering_controller.yaml
destogl Feb 8, 2023
8f527f1
Last updates of CMake files copyright year and docs.
destogl Feb 8, 2023
6021447
Update controllers_index.rst
destogl Feb 8, 2023
c1d7515
fix typos
bmagyar Feb 21, 2023
563f8a9
Fix typos
bmagyar Feb 21, 2023
aa41b9d
Merge branch 'master' into ackermann-odometry-library
bmagyar Mar 20, 2023
9b9cadb
Update steering_controllers_library/src/steering_odometry.cpp
destogl Mar 22, 2023
c0144cf
Restore control_msgs repo version
bmagyar Apr 4, 2023
bcbc61c
Merge branch 'master' into ackermann-odometry-library
bmagyar Apr 4, 2023
ba54cb2
Merge branch 'master' into ackermann-odometry-library
bmagyar Apr 5, 2023
2b41621
fix format
bmagyar Apr 5, 2023
469702c
Fix typo in link
bmagyar Apr 5, 2023
63e4c28
Braces are good for you
bmagyar Apr 5, 2023
676239e
Fix typo
bmagyar Apr 5, 2023
ce4f36a
Add units to parameters
bmagyar Apr 5, 2023
c609707
Fix typo
bmagyar Apr 5, 2023
cd7622e
Merge branch 'master' into ackermann-odometry-library
bmagyar Apr 5, 2023
a3083e8
fix format again?!
bmagyar Apr 5, 2023
c1431af
Return update_odometry() instead of return true
bmagyar Apr 5, 2023
d78bb6a
Update to new signature of update_reference_from_subscribers
bmagyar Apr 5, 2023
092b459
Remove odom member from state publishing (doesn't exist)
bmagyar Apr 5, 2023
55d158c
Fix test compilation
bmagyar Apr 12, 2023
ecdf2a5
fix format
bmagyar Apr 12, 2023
d817144
Renovate load controller tests
bmagyar Apr 12, 2023
79f5102
remove typo
bmagyar Apr 26, 2023
96bcefa
fixed use_stamped_vel doc (#12)
ARK3r May 19, 2023
b9bdf63
Steering controller time related test fixes (#13)
ARK3r May 22, 2023
9e9007e
Merge branch 'master' into ackermann-odometry-library
bmagyar May 22, 2023
503f748
Controllers not initialized in the 4 steering controllers (#14)
ARK3r May 26, 2023
a27f976
Update style for lists in docs
bmagyar May 26, 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
90 changes: 45 additions & 45 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ repos:
- id: black
args: ["--line-length=99"]

# PEP 257
- repo: https://github.com/FalconSocial/pre-commit-mirrors-pep257
rev: v0.3.3
hooks:
- id: pep257
args: ["--ignore=D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404"]
# # PEP 257
# - repo: https://github.com/FalconSocial/pre-commit-mirrors-pep257
# rev: v0.3.3
# hooks:
# - id: pep257
# args: ["--ignore=D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404"]

- repo: https://github.com/pycqa/flake8
rev: 5.0.4
Expand All @@ -74,48 +74,48 @@ repos:
#- id: cppcheck
#args: ['--error-exitcode=1', '-f', '--inline-suppr', '-q', '-rp', '--suppress=internalAstError', '--suppress=unknownMacro', '--verbose']

- repo: local
hooks:
- id: ament_cppcheck
name: ament_cppcheck
description: Static code analysis of C/C++ files.
stages: [commit]
entry: ament_cppcheck
language: system
files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$
# - repo: local
# hooks:
# - id: ament_cppcheck
# name: ament_cppcheck
# description: Static code analysis of C/C++ files.
# stages: [commit]
# entry: ament_cppcheck
# language: system
# files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$

# Maybe use https://github.com/cpplint/cpplint instead
- repo: local
hooks:
- id: ament_cpplint
name: ament_cpplint
description: Static code analysis of C/C++ files.
stages: [commit]
entry: ament_cpplint
language: system
files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$
args: ["--linelength=100", "--filter=-whitespace/newline"]
# # Maybe use https://github.com/cpplint/cpplint instead
# - repo: local
# hooks:
# - id: ament_cpplint
# name: ament_cpplint
# description: Static code analysis of C/C++ files.
# stages: [commit]
# entry: ament_cpplint
# language: system
# files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$
# args: ["--linelength=100", "--filter=-whitespace/newline"]

# Cmake hooks
- repo: local
hooks:
- id: ament_lint_cmake
name: ament_lint_cmake
description: Check format of CMakeLists.txt files.
stages: [commit]
entry: ament_lint_cmake
language: system
files: CMakeLists\.txt$
# # Cmake hooks
# - repo: local
# hooks:
# - id: ament_lint_cmake
# name: ament_lint_cmake
# description: Check format of CMakeLists.txt files.
# stages: [commit]
# entry: ament_lint_cmake
# language: system
# files: CMakeLists\.txt$

# Copyright
- repo: local
hooks:
- id: ament_copyright
name: ament_copyright
description: Check if copyright notice is available in all files.
stages: [commit]
entry: ament_copyright
language: system
# # Copyright
# - repo: local
# hooks:
# - id: ament_copyright
# name: ament_copyright
# description: Check if copyright notice is available in all files.
# stages: [commit]
# entry: ament_copyright
# language: system

# Docs - RestructuredText hooks
- repo: https://github.com/PyCQA/doc8
Expand Down
90 changes: 90 additions & 0 deletions steering_controllers/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
cmake_minimum_required(VERSION 3.8)
project(steering_controllers)

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

# find dependencies
set(THIS_PACKAGE_INCLUDE_DEPENDS
control_msgs
controller_interface
geometry_msgs
hardware_interface
nav_msgs
pluginlib
rclcpp
rclcpp_lifecycle
realtime_tools
std_srvs
tf2
tf2_msgs
tf2_geometry_msgs
ackermann_msgs
)

find_package(ament_cmake REQUIRED)
find_package(generate_parameter_library REQUIRED)
foreach(Dependency IN ITEMS ${THIS_PACKAGE_INCLUDE_DEPENDS})
find_package(${Dependency} REQUIRED)
endforeach()

add_library(
${PROJECT_NAME}
SHARED
src/steering_controllers.cpp
src/steering_odometry.cpp
src/steering_controller_implementations.cpp
petkovich marked this conversation as resolved.
Show resolved Hide resolved
)
generate_parameter_library(steering_controllers_parameters
src/steering_controllers.yaml
)

#target_include_directories(${PROJECT_NAME} PRIVATE include)
target_include_directories(${PROJECT_NAME} PUBLIC
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>")
target_link_libraries(${PROJECT_NAME} steering_controllers_parameters)
ament_target_dependencies(${PROJECT_NAME} ${THIS_PACKAGE_INCLUDE_DEPENDS})
target_compile_definitions(${PROJECT_NAME} PRIVATE "STEERING_CONTROLLERS_BUILDING_DLL")

pluginlib_export_plugin_description_file(
controller_interface steering_controllers.xml)

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

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

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
# the following line skips the linter which checks for copyrights
# comment the line when a copyright and license is added to all source files
set(ament_cmake_copyright_FOUND TRUE)
# the following line skips cpplint (only works in a git repo)
# comment the line when this package is in a git repo and when
# a copyright and license is added to all source files
set(ament_cmake_cpplint_FOUND TRUE)
ament_lint_auto_find_test_dependencies()
petkovich marked this conversation as resolved.
Show resolved Hide resolved
endif()

ament_export_include_directories(
include
)

ament_export_dependencies(
${THIS_PACKAGE_INCLUDE_DEPENDS}
)
ament_export_libraries(
${PROJECT_NAME}
)

ament_package()
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// Copyright (c) 2022, Stogl Robotics Consulting UG (haftungsbeschränkt)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef STEERING_CONTROLLERS_IMPLEMENTATIONS_HPP_
#define STEERING_CONTROLLERS_IMPLEMENTATIONS_HPP_

#include "steering_controllers/steering_controllers.hpp"

namespace ackermann_steering_controller
{
class AckermannSteeringController : public steering_controllers::SteeringControllers
{
public:
AckermannSteeringController();

STEERING_CONTROLLERS__VISIBILITY_PUBLIC controller_interface::CallbackReturn configure_odometry()
override;
};
} // namespace ackermann_steering_controller

namespace bicycle_steering_controller
{
class BicycleSteeringController : public steering_controllers::SteeringControllers
{
public:
BicycleSteeringController();

STEERING_CONTROLLERS__VISIBILITY_PUBLIC controller_interface::CallbackReturn configure_odometry()
override;

STEERING_CONTROLLERS__VISIBILITY_PUBLIC bool update_odometry(
const rclcpp::Duration & period) override;
};
} // namespace bicycle_steering_controller

namespace tricycle_steering_controller
{
class TricycleSteeringController : public steering_controllers::SteeringControllers
{
public:
TricycleSteeringController();

STEERING_CONTROLLERS__VISIBILITY_PUBLIC controller_interface::CallbackReturn configure_odometry()
override;
STEERING_CONTROLLERS__VISIBILITY_PUBLIC bool update_odometry(
const rclcpp::Duration & period) override;
};
} // namespace tricycle_steering_controller

#endif // STEERING_CONTROLLERS_IMPLEMENTATIONS_HPP_
Loading