-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reverted the removed controller and fixed some bugs
This controller is based on @mateusmenezes95 3 wheel omnidirectional controller.
- Loading branch information
Showing
25 changed files
with
1,855 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
controller_manager: | ||
ros__parameters: | ||
update_rate: 30 | ||
#use_sim_time: true | ||
|
||
joint_state_broadcaster: | ||
type: joint_state_broadcaster/JointStateBroadcaster | ||
|
||
omnidirectional_controller: | ||
type: omnidirectional_controllers/OmnidirectionalController | ||
|
||
omnidirectional_controller: | ||
ros__parameters: | ||
wheel_names: | ||
- roue_avant_joint | ||
- roue_gauche_joint | ||
- roue_arriere_joint | ||
- roue_droite_joint | ||
|
||
robot_radius: 0.1 | ||
wheel_radius: 0.053112205 | ||
gamma: 30.0 # angle between body fixed y axis and the normal of wheel3 | ||
|
||
publish_rate: 50.0 | ||
odom_frame_id: odom | ||
base_frame_id: base_link | ||
pose_covariance_diagonal : [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] | ||
twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] | ||
odom_numeric_integration_method: runge_kutta2 | ||
|
||
open_loop: true | ||
enable_odom_tf: true | ||
|
||
cmd_vel_timeout: 0.5 | ||
use_stamped_vel: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
controller_manager: | ||
ros__parameters: | ||
update_rate: 100 | ||
use_sim_time: true | ||
|
||
omnidirectional_controller: | ||
type: forward_command_controller/ForwardCommandController | ||
|
||
joint_state_broadcaster: | ||
type: joint_state_broadcaster/JointStateBroadcaster | ||
|
||
omnidirectional_controller: | ||
ros__parameters: | ||
joints: | ||
- roue_avant_joint | ||
- roue_gauche_joint | ||
- roue_arriere_joint | ||
- roue_droite_joint | ||
interface_name: velocity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.png filter=lfs diff=lfs merge=lfs -text |
20 changes: 20 additions & 0 deletions
20
src/omnidirectional_controllers/.github/workflows/humble-source-build.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Humble Source Build | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- humble | ||
|
||
jobs: | ||
humble_source_build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
rosdistro: humble | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
package-name: omnidirectional_controllers | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
target-ros2-distro: humble | ||
skip-tests: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
devel/ | ||
logs/ | ||
build/ | ||
bin/ | ||
lib/ | ||
msg_gen/ | ||
srv_gen/ | ||
msg/*Action.msg | ||
msg/*ActionFeedback.msg | ||
msg/*ActionGoal.msg | ||
msg/*ActionResult.msg | ||
msg/*Feedback.msg | ||
msg/*Goal.msg | ||
msg/*Result.msg | ||
msg/_*.py | ||
build_isolated/ | ||
devel_isolated/ | ||
|
||
# Generated by dynamic reconfigure | ||
*.cfgc | ||
/cfg/cpp/ | ||
/cfg/*.py | ||
|
||
# Ignore generated docs | ||
*.dox | ||
*.wikidoc | ||
|
||
# eclipse stuff | ||
.project | ||
.cproject | ||
|
||
# qcreator stuff | ||
CMakeLists.txt.user | ||
|
||
srv/_*.py | ||
*.pcd | ||
*.pyc | ||
qtcreator-* | ||
*.user | ||
|
||
/planning/cfg | ||
/planning/docs | ||
/planning/src | ||
|
||
*~ | ||
|
||
# Emacs | ||
.#* | ||
|
||
# Catkin custom files | ||
CATKIN_IGNORE | ||
|
||
|
||
# vscode folder | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
project(omnidirectional_controllers) | ||
|
||
# Default to C99 | ||
if(NOT CMAKE_C_STANDARD) | ||
set(CMAKE_C_STANDARD 99) | ||
endif() | ||
|
||
# Default to C++14 | ||
if(NOT CMAKE_CXX_STANDARD) | ||
set(CMAKE_CXX_STANDARD 14) | ||
endif() | ||
|
||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
add_compile_options(-Wall -Wextra -Wpedantic) | ||
endif() | ||
|
||
# find dependencies | ||
find_package(ament_cmake REQUIRED) | ||
|
||
set(THIS_PACKAGE_INCLUDE_DEPENDS | ||
controller_interface | ||
geometry_msgs | ||
hardware_interface | ||
nav_msgs | ||
pluginlib | ||
rclcpp_lifecycle | ||
rclcpp | ||
tf2_msgs | ||
tf2_ros | ||
tf2 | ||
) | ||
|
||
find_package(ament_cmake REQUIRED) | ||
foreach(Dependency IN ITEMS ${THIS_PACKAGE_INCLUDE_DEPENDS}) | ||
find_package(${Dependency} REQUIRED) | ||
endforeach() | ||
|
||
add_library(odometry SHARED) | ||
|
||
target_sources(odometry | ||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src/odometry.cpp | ||
) | ||
|
||
target_include_directories(odometry | ||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:include> | ||
) | ||
|
||
add_library(kinematics SHARED) | ||
|
||
target_sources(kinematics | ||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src/kinematics.cpp | ||
) | ||
|
||
target_include_directories(kinematics | ||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:include> | ||
) | ||
|
||
add_library(${PROJECT_NAME} SHARED | ||
src/omnidirectional_controller.cpp | ||
) | ||
|
||
target_include_directories(${PROJECT_NAME} | ||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:include> | ||
) | ||
|
||
ament_target_dependencies(${PROJECT_NAME} | ||
${THIS_PACKAGE_INCLUDE_DEPENDS} | ||
) | ||
|
||
target_link_libraries(${PROJECT_NAME} | ||
odometry | ||
kinematics | ||
) | ||
|
||
target_compile_definitions(${PROJECT_NAME} PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS") | ||
pluginlib_export_plugin_description_file(controller_interface omnidirectional_plugin.xml) | ||
|
||
install(DIRECTORY include/ | ||
DESTINATION include | ||
) | ||
|
||
install(TARGETS ${PROJECT_NAME} | ||
RUNTIME DESTINATION bin | ||
ARCHIVE DESTINATION lib | ||
LIBRARY DESTINATION lib | ||
) | ||
|
||
if(BUILD_TESTING) | ||
find_package(ament_lint_auto REQUIRED) | ||
find_package(ament_cmake_gmock REQUIRED) | ||
|
||
ament_lint_auto_find_test_dependencies() | ||
|
||
ament_add_gmock( | ||
test_odometry | ||
test/test_odometry.cpp | ||
src/odometry.cpp | ||
) | ||
|
||
target_link_libraries(test_odometry | ||
odometry | ||
kinematics | ||
) | ||
|
||
ament_add_gmock( | ||
test_kinematics | ||
test/test_kinematics.cpp | ||
src/kinematics.cpp | ||
) | ||
|
||
target_link_libraries(test_kinematics | ||
odometry | ||
kinematics | ||
) | ||
|
||
target_include_directories(test_odometry PRIVATE include) | ||
ament_target_dependencies(test_odometry) | ||
|
||
target_include_directories(test_kinematics PRIVATE include) | ||
ament_target_dependencies(test_kinematics) | ||
endif() | ||
|
||
ament_export_dependencies( | ||
${THIS_PACKAGE_INCLUDE_DEPENDS} | ||
) | ||
|
||
ament_export_include_directories( | ||
include | ||
) | ||
|
||
ament_export_libraries( | ||
${PROJECT_NAME} | ||
) | ||
|
||
ament_package() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Mateus Menezes | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.