    * [ All features ](/features)
    * [ Documentation  ](https://docs.github.com)
    * [ GitHub Skills  ](https://skills.github.com/)
    * [ Blog  ](https://github.blog)


[
![@henningkayser](https://avatars.githubusercontent.com/u/4572766?s=40&u=57f5385857b3a63598148847abc2b35f2cfe2765&v=4)
](/henningkayser) [ henningkayser ](/henningkayser) mentioned this issue  Sep
21, 2020


Contributor


[
![@henningkayser](https://avatars.githubusercontent.com/u/4572766?s=80&u=57f5385857b3a63598148847abc2b35f2cfe2765&v=4)
](/henningkayser)


__ [ MoveIt Documentation: Humble ](../../../index.html)


**[ AndyZe ](/AndyZe) ** commented  Apr 14, 2022


Assignees


  * [ Code  ](/ros-planning/moveit2)
  * [ Issues  ](/ros-planning/moveit2/issues)
  * [ Pull requests  ](/ros-planning/moveit2/pulls)
  * [ Discussions  ](/ros-planning/moveit2/discussions)
  * [ Actions  ](/ros-planning/moveit2/actions)
  * [ Projects  ](/ros-planning/moveit2/projects)
  * [ Security  ](/ros-planning/moveit2/security)
  * [ Insights  ](/ros-planning/moveit2/pulse)


Thanks for the hint, so I usually set the rate to 100/200/500/1000 Hz. These
rates are exact.


[ Sign in ](/login?return_to=https%3A%2F%2Fgithub.com%2Fros-
planning%2Fmoveit2%2Fissues%2F1182)


![](https://sea2.discourse-
cdn.com/business7/user_avatar/discourse.ros.org/destogl/48/7158_2.png)
destogl:


* [ The ReadME Project  GitHub community articles  ](/readme)


Repositories


That’s fine, but to do a proper control, you should know the exact rate at
which the controller is running. Otherwise, you will never get perfect
trajectories.


Clear


The file ` joint_command_handle.hpp ` has removed by [ ros-
controls/ros2_control#134 ](https://github.com/ros-
controls/ros2_control/pull/134) .


* 👍  4 reactions


3. Launch the corresponding ` ros2_control  ` JointTrajectoryControllers. This is separate from the MoveIt2 ecosystem. [ Example ros2_control launching ](https://github.com/ros-controls/ros2_control_demos) . Each JointTrajectoryController provides an action interface. Given the yaml file above, MoveIt automatically connects to this action interface.


May I create a pull request to ` JafarAbdi/fake_joint ` ?


##  Comments


Copy link


You're reading the documentation for a stable version of MoveIt that is not
being developed further. For information on the recommended version, please
have a look at [ Main
](../../../../main/doc/examples/controller_configuration/controller_configuration_tutorial.html)
.


All reactions


One issue: this YAML file is only used by the [ MoveItSimpleControllerManager
](https://github.com/ros-
planning/moveit2/blob/main/moveit_plugins/moveit_simple_controller_manager/src/moveit_simple_controller_manager.cpp)
, right? I'm using the [ MoveItControllerManager ](https://github.com/ros-
planning/moveit2/blob/main/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp)
, which gets controller states from the ros2_control ControllerManager, and
ros2_control does not have an equivalent concept of a controller being set as
a default.

---

All reactions


ROS Resources: [ ROS Homepage ](http://ros.org/) | [ Media and Trademarks
](https://www.ros.org/blog/media/) | [ Documentation ](http://docs.ros.org/) |
[ ROS Index ](https://index.ros.org/) | [ How to Get Help
](http://wiki.ros.org/Support) | [ Q&A Help Site
](https://robotics.stackexchange.com/) | [ Discussion Forum
](http://discourse.ros.org/) | [ Service Status ](http://status.ros.org/)
---

[ ROS Discourse ](/)


[ Drivers  ](/c/drivers/54)


    * [ Actions  Automate any workflow  ](/features/actions)
    * [ Packages  Host and manage packages  ](/features/packages)
    * [ Security  Find and fix vulnerabilities  ](/features/security)
    * [ Codespaces  Instant dev environments  ](/features/codespaces)
    * [ Copilot  Write better code with AI  ](/features/copilot)
    * [ Code review  Manage code changes  ](/features/code-review)
    * [ Issues  Plan and track work  ](/features/issues)
    * [ Discussions  Collaborate outside of code  ](/features/discussions)


Just turn off ` moveit_manage_controllers ` so trajectories execute with that
controller by default, instead of searching for an active controller.


[
![@bmagyar](https://avatars.githubusercontent.com/u/3524577?s=80&u=8f938d2dcacdcbb54f3977d6356cef945a6eb6ed&v=4)
](/bmagyar)


4. Note: it is not required to use ` ros2_control  ` for your robot. You could write a proprietary action interface. In practice, 99% of users choose ` ros2_control  ` .


Password


[
![@henningkayser](https://avatars.githubusercontent.com/u/4572766?s=80&u=57f5385857b3a63598148847abc2b35f2cfe2765&v=4)
](/henningkayser)


[
![@ShotaAk](https://avatars.githubusercontent.com/u/18494952?s=80&u=a667bf5de7c93b116f1a71ad9a7b8619e58213f0&v=4)
](/ShotaAk)


It would be great if you check it and try to use it. We are very happy to get
any feedback on it. Especially how to make it better.

---

👍  1  ShotaAk reacted with thumbs up emoji


You can’t perform that action at this time.


[ ros-planning ](/ros-planning) /  **[ moveit2 ](/ros-planning/moveit2) **
Public


#  How to specify a controller to use when executing a trajectory through the
MoveGroup ROS interface?  #1182


  * ROS Distro: Foxy
  * OS Version: Ubuntu 20.04
  * Source build
  * If source, which branch? [ ` ddf585c ` ](https://github.com/ros-planning/moveit2/commit/ddf585cf5a9fe303da5900a8c49c1d39b40d3398)


Labels


Copy link


IIRC you can specify a default controller name. For example:


I think that the TEM actually does not have a way to read if a given
controller is set as default or not. I see that this part of the controller
state is read [ here ](https://github.com/ros-
planning/moveit2/blob/14d2a932c74ab1dc6bed652738d17ee2bae23d4f/moveit_ros/planning/trajectory_execution_manager/src/trajectory_execution_manager.cpp#L778-L779)
, but I can't find where we read the parameter you linked and set its value in
the controller state info.

---

All reactions


>                         desired_hw_update_rate_ == 0 ||
>                         ((update_loop_counter_ % desired_hw_update_rate_) ==
> 0);
>
>       if (hardware_go){
>         // hardware comms and operations
>         ...
>       }
>       ...
>
>       // update counter
>       ++update_loop_counter_;
>       update_loop_counter_ %= main_loop_update_rate_;
>     }
>


We read every piece of feedback, and take your input very seriously.


  By counting loops  

Current implementation of [ ros2_control main node ](https://github.com/ros-
controls/ros2_control/blob/master/controller_manager/src/ros2_control_node.cpp)
has one update rate that controls the rate of the [ read(…)
](https://github.com/ros-
controls/ros2_control/blob/0bdcd414c7ab8091f3e1b8d9b73a91c778388e82/hardware_interface/include/hardware_interface/system_interface.hpp


[ ](https://github.com "GitHub") © 2024 GitHub, Inc.


2 Likes


[ moveit2 ](https://discourse.ros.org/tag/moveit2)


MoveItMultiControllerManager can be used for more than one ros_control nodes.
It works by creating several MoveItControllerManagers, one for each node. It
instantiates them with their respective namespace and takes care of proper
delegation. To use it must be added to the launch file.


![](https://sea2.discourse-
cdn.com/business7/user_avatar/discourse.ros.org/mhubii/48/5381_2.png) mhubii:


I don't want to sound too negative about your idea. If we add this new
feature, can we strip out some "controller searching" code, too? Don't want to
keep adding and adding without removing.

---

All reactions


Additional navigation options


1 task


Contributor


#  Saved searches


##  Example Controller Manager  


Repositories


[ ![Logo](../../../_static/humble-small.png) ](../../../index.html)


Yes. I had checkout ` ros2_control ` to [
2c3aad1cb8ad4d23925bceeb5c26e22d6cf859ef ](https://github.com/ros-
controls/ros2_control/tree/2c3aad1cb8ad4d23925bceeb5c26e22d6cf859ef) and `
ros2_controllers ` to [ d52902538a970e792ecc604416e22ef90a57f29e
](https://github.com/ros-
controls/ros2_controllers/tree/d52902538a970e792ecc604416e22ef90a57f29e) ,
then the demo successfully worked.

---

👍  4  alan0428a, srujan-aris, shonigmann, and bxtbold reacted with thumbs up
emoji


[ enhancement  ](/ros-planning/moveit2/labels/enhancement) New feature or
request


Contributor  Author


edited


* _joints_ : Names of all the joints that are being addressed by this interface.


> Should I use ` position_controllers/JointGroupPositionController ` instead?


> I'd like to first make sure that the API is somewhat stable


However, for some applications you might desire a more custom controller
manager. An example template for starting your custom controller manager is
provided [ here ](https://github.com/ros-
planning/moveit2_tutorials/blob/main/doc/examples/controller_configuration/src/moveit_controller_manager_example.cpp)
.


[ #134 broke MoveIt builds  ros-controls/ros2_control#155  ](/ros-
controls/ros2_control/issues/155)


##  Use saved searches to filter your results more quickly


Sorry, something went wrong.


{{ message }}


I’ll try to use a different controller. Thanks for your help. Please feel free
to delete.


**[ schornakj ](/schornakj) ** commented  Apr 14, 2022


The build command results success.


1. A YAML config file. As best practice, we suggest naming this ` moveit_controllers.yaml  ` . It tells MoveIt which controllers are available, which joints are associated with each, and the MoveIt controller interface type ( ` FollowJointTrajectory  ` or ` GripperCommand  ` ). [ Example controller config file ](https://github.com/ros-planning/moveit_resources/blob/ros2/panda_moveit_config/config/moveit_controllers.yaml) .


Email Address


(I should mention that the ` ros2_control_node ` is executed with real time
priority on the RT_PREEMPT linux patch)


[ release ](https://discourse.ros.org/tag/release) , [ ros_control
](https://discourse.ros.org/tag/ros_control)


|  0  |  771  |  February 15, 2017
[ Announcing ros2_control for Foxy ](https://discourse.ros.org/t/announcing-
ros2-control-for-foxy/18274)


Labels


[
![@AndyZe](https://avatars.githubusercontent.com/u/11284393?s=80&u=24eb488e02f9d9ce574f09c9025fa15d8f3814e6&v=4)
](/AndyZe)


Contributor


(I should calm down and see the progress.）

---

All reactions


###  Related Topics


* Solutions


[ AndyZe  ](https://discourse.ros.org/u/AndyZe) February 11, 2022, 7:28pm  10


[ ShotaAk ](/ShotaAk) opened this issue  Sep 17, 2020  · 15 comments  · Fixed
by [ #361 ](https://github.com/ros-planning/moveit2/pull/361)


> Therefore, at each step, I send a trajectory `
> control_msgs::action::FollowJointTrajectory ` with a **single** point, using
> an action client.


###  Description


Cancel  Submit feedback


The text above describes launching of a joint trajectory controller action
interface. In addition, MoveIt supports parallel-jaw gripper control via
action interface. This section describes the parameters of these two options.


**[ ShotaAk ](/ShotaAk) ** commented  Sep 27, 2020


* Open Source


##  MoveIt Controller Manager  


[
![@schornakj](https://avatars.githubusercontent.com/u/14431472?s=40&u=fcccfc4fa3bebac047c907adad078dc822f22ccc&v=4)
](/schornakj) [ schornakj ](/schornakj) added the [ enhancement ](/ros-
planning/moveit2/labels/enhancement) New feature or request  label  Apr 14,
2022


[ ](https://github.com "GitHub") © 2024 GitHub, Inc.


Member


* [ Pricing ](/pricing)


All controller names get prefixed by the namespace of their ros_control node.
For this reason controller names should not contain slashes, and can’t be
named ` /  ` . For a particular node MoveIt can decide which controllers to
have started or stopped. Since only controller names with registered allocator
plugins are handled over MoveIt, MoveIt takes care of stopping controllers
based on their claimed resources if a to-be-started controller needs any of
those resources.


Sorry, something went wrong.


[
![@henningkayser](https://avatars.githubusercontent.com/u/4572766?s=40&u=57f5385857b3a63598148847abc2b35f2cfe2765&v=4)
](/henningkayser) [ henningkayser ](/henningkayser) linked a pull request  Feb
9, 2021  that will  close  this issue


[ enhancement  ](/ros-planning/moveit2/labels/enhancement) New feature or
request


[ mhubii  ](https://discourse.ros.org/u/mhubii) February 11, 2022, 1:48pm  7


there are indeed blocking calls, which is why I removed the sleep statements
in the control loop.


Development


Cancel  Create saved search


[ General  ](/c/general/8)


    * [ Learning Pathways  ](https://resources.github.com/learn/pathways/)
    * [ White papers, Ebooks, Webinars  ](https://resources.github.com/)
    * [ Customer Stories ](/customer-stories)
    * [ Partners  ](https://partner.github.com/)


[
![@ShotaAk](https://avatars.githubusercontent.com/u/18494952?s=80&u=a667bf5de7c93b116f1a71ad9a7b8619e58213f0&v=4)
](/ShotaAk)


The ` joint_trajectory_controller/JointTrajectoryController ` is used for
control. When sending joint positions via an action client, the resulting
motion is unsmooth.


    * [ Enterprise ](/enterprise)
    * [ Teams ](/team)
    * [ Startups ](/enterprise/startups)
    * [ Education  ](https://education.github.com)


>         hardware_interface::SystemInterface::on_init(info) !=
>         hardware_interface::CallbackReturn::SUCCESS)
>       {
>         return hardware_interface::CallbackReturn::ERROR;
>       }
>
>       //   declaration in *.hpp file --> unsigned int
> main_loop_update_rate_, desired_hw_update_rate_ = 100 ;
>       main_loop_update_rate_ =
> stoi(info_.hardware_parameters["main_loop_update_rate"]);
>       desired_hw_update_rate_ =
> stoi(info_.hardware_parameters["desired_hw_update_rate"]);
>
>       ...
>     }
>     ...
>     } // my_system_interface
>

  3. In your ` on_activate  ` specific implementation reset internal loop counter

>
>     hardware_interface::CallbackReturn MySystemHardware::on_activate(
>       const rclcpp_lifecycle::State & /*previous_state*/)
>     {
>         //   declaration in *.hpp file --> unsigned int update_loop_counter_
> ;
>         update_loop_counter_ = 0;
>         ...
>     }
>

  4. In your ` read(const  rclcpp::Time  & time,  const  rclcpp::Duration  & period)  ` and/or ` write(const  rclcpp::Time  & time,  const  rclcpp::Duration  & period)  ` specific implementations decide if you should interfere with your hardware

>
>     hardware_interface::return_type MySystemHardware::read(const
> rclcpp::Time & time, const rclcpp::Duration & period)
>     {
>
>       bool hardware_go = main_loop_update_rate_ == 0  ||


  * [ Code  ](/ros-planning/moveit2)
  * [ Issues  245  ](/ros-planning/moveit2/issues)
  * [ Pull requests  42  ](/ros-planning/moveit2/pulls)
  * [ Discussions  ](/ros-planning/moveit2/discussions)
  * [ Actions  ](/ros-planning/moveit2/actions)
  * [ Projects  1  ](/ros-planning/moveit2/projects)
  * [ Security  ](/ros-planning/moveit2/security)
  * [ Insights  ](/ros-planning/moveit2/pulse)


Search


**[ henningkayser ](/henningkayser) ** commented  Sep 21, 2020


Status: No status  +2 more


[ ![@destogl](https://avatars.githubusercontent.com/u/1918204?s=80&v=4)
](/destogl)


(TODO: update for ROS2)


Clear


> there are indeed blocking calls, which is why I removed the sleep statements
> in the control loop.


(Or should we wait and see the ros2_control proggress?)

---

All reactions


##  Footer


[ Sign up
](/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-
name%3E%2F%3Crepo-
name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-
repo&source_repo=ros-planning%2Fmoveit2)


When the ExecuteTrajectoryAction MoveGroup capability [ pushes a new
trajectory ](https://github.com/ros-
planning/moveit2/blob/14d2a932c74ab1dc6bed652738d17ee2bae23d4f/moveit_ros/move_group/src/default_capabilities/execute_trajectory_action_capability.cpp#L111)
to the TrajectoryExecutionManager, it does not have a way to set what
controller should be used to execute the trajectory. This results in the
TrajectoryExecutionManager being left to [ figure out what controller should
be used ](https://github.com/ros-
planning/moveit2/blob/14d2a932c74ab1dc6bed652738d17ee2bae23d4f/moveit_ros/planning/trajectory_execution_manager/src/trajectory_execution_manager.cpp#L728-L810)
. In situations where there are multiple possible controllers for the same set
of joints (for example, a JointGroupPositionController used for Servo and a
JointTrajectoryController for regular trajectory execution), the TEM simply
doesn't have enough contextual info to make the right decision, which results
in undesirable results if the wrong controller is selected.


**[ schornakj ](/schornakj) ** commented  Apr 14, 2022


1 Like


By clicking “Sign up for GitHub”, you agree to our [ terms of service
](https://docs.github.com/terms) and [ privacy statement
](https://docs.github.com/privacy) . We’ll occasionally send you account
related emails.


Copy link


I have recently been working with the Fast Robot Interface (FRI, control of
KUKA LBR) and implemented the ` harware_interface::SystemInterface ` for it,
see [ GitHub - KCL-BMEIS/lbr_fri_ros2_stack ](https://github.com/KCL-
BMEIS/lbr_fri_ros2_stack) .


Open


[ @destogl ](https://github.com/destogl) Thank you for your information.


**[ yongxf ](/yongxf) ** commented  Sep 17, 2020


None yet


concepts)
      * [ Controller Manager ](../../controller_manager/doc/userdoc.html)
      * [ Controller Chaining / Cascade Control ](../../controller_manager/doc/controller_chaining.html)
      * [ Hardware Components ](hardware_components_userdoc.html)
        * [ Guidelines and Best Practices ](hardware_components_userdoc.html


Setting ` moveit_manage_controllers = False ` would require me to switch
between the controllers elsewhere in my code, right? If the controllers aren't
switched automatically before handling the trajectory, I would have to make
sure that the streaming controller is inactive before executing a trajectory
that should use the joint trajectory controller.


edited


The parameters are:


> The Fast Robot Interface was built by KUKA such that the controller and the
> controlling computer run at the same rate. The computer waits from messages
> by the controller and responds to them.


[ ![@yongxf](https://avatars.githubusercontent.com/u/18318195?s=80&v=4)
](/yongxf)


##  Simulation  


I know that MoveIt2 experimented with Rucking and we in ros2_control also did.
For a bit different purpose, but the smoothening didn’t work as expected. I
suppose that the main difference is that MoveIt sends trajectories and not
points. Then JointTrajectoryController (JTC) process these trajectories as
needed. This is usually results in the best/smoothest movement.


    In file included from /home/shotaak/moveit_ws/src/fake_joint/fake_joint_driver/src/fake_joint_driver_node.cpp:10:
    /home/shotaak/moveit_ws/src/fake_joint/fake_joint_driver/include/fake_joint_driver/fake_joint_driver.h:12:10: fatal error: hardware_interface/joint_command_handle.hpp: No such file or directory
       12 | #include <hardware_interface/joint_command_handle.hpp>
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.


Pick a username


##  Footer


Thank you very much for reading, and for your response, kind regard
Martin


Sorry, something went wrong.


Milestone


**[ AndyZe ](/AndyZe) ** commented  Apr 14, 2022


[ @ShotaAk ](https://github.com/ShotaAk) That's great, thanks! In general, I
think it's preferable to stay up to date, but I'd like to first make sure that
the API is somewhat stable. The PR would still be very helpful, even if we
don't merge it right away.

---

All reactions


(TODO: update for ROS2)


[ @ShotaAk ](https://github.com/ShotaAk) I just wrote short documentation in [
ros-controls/roadmap#36 ](https://github.com/ros-controls/roadmap/pull/36)


When you run a [ move group node
](../move_group_interface/move_group_interface_tutorial.html) , you may need
to remap the topic /joint_states to /robot/joint_states, otherwise MoveIt
won’t have feedback from the joints. To do this remapping you could make a
simple launch file for your node as follows:


> At which frequency is running your hardware? I would guess probably
> something around 200Hz.


Copy link


* 👍  1 reaction


> Just turn off moveit_manage_controllers so trajectories execute with that
> controller by default, instead of searching for an active controller.


Include my email address so I can be contacted


Member


##  MoveIt Controller Interfaces  


  * [ Terms ](https://docs.github.com/site-policy/github-terms/github-terms-of-service)
  * [ Privacy ](https://docs.github.com/site-policy/privacy-policies/github-privacy-statement)
  * [ Security ](/security)
  * [ Status ](https://www.githubstatus.com/)
  * [ Docs ](https://docs.github.com/)
  * [ Contact ](https://support.github.com?tags=dotcom-footer)
  * Manage cookies
  * Do not share my personal information


guidelines-and-best-practices)
          * [ Hardware Interface Types ](hardware_interface_types_userdoc.html)
          * [ Writing a Hardware Component ](writing_new_hardware_component.html)
          * Different Update Rates
            * By counting loops
            * By measuring elapsed time
          * [ Handling of errors that happen during read() and write() calls ](hardware_components_userdoc.html


By clicking “Sign up for GitHub”, you agree to our [ terms of service
](https://docs.github.com/terms) and [ privacy statement
](https://docs.github.com/privacy) . We’ll occasionally send you account
related emails.


Contributor  Author


[ MoveIt  ](/orgs/ros-planning/projects/5)


2 participants


[ ](https://github.com/)


Additional navigation options


###  Expected behaviour


We read every piece of feedback, and take your input very seriously.


Toggle navigation


**[ schornakj ](/schornakj) ** commented  Apr 14, 2022  •


[
![@ShotaAk](https://avatars.githubusercontent.com/u/18494952?s=80&u=a667bf5de7c93b116f1a71ad9a7b8619e58213f0&v=4)
](/ShotaAk)


No branches or pull requests


* [ GitHub Sponsors  Fund open source developers  ](/sponsors)


edited


I've created [ #284 ](https://github.com/ros-planning/moveit2/pull/284) for
freezing the ` ros2_control ` commits in the workspace. [ @ShotaAk
](https://github.com/ShotaAk) could you rename this issue to something like
"Use new ros2_control interfaces" so that we can continue tracking it in here?

---

All reactions


[ Sign in ](/login?return_to=https%3A%2F%2Fgithub.com%2Fros-
planning%2Fmoveit2%2Fissues%2F283)


Search or jump to...


Closed


[ ShotaAk ](/ShotaAk) opened this issue  Sep 17, 2020  · 15 comments  · Fixed
by [ #361 ](https://github.com/ros-planning/moveit2/pull/361)


Copy link


Contributor


Member


###  Additional context


#  Provide feedback


[ ![@AndyZe](https://avatars.githubusercontent.com/u/11284393?s=52&v=4)
](/AndyZe) [
![@schornakj](https://avatars.githubusercontent.com/u/14431472?s=52&v=4)
](/schornakj)


[ ![@destogl](https://avatars.githubusercontent.com/u/1918204?s=80&v=4)
](/destogl)


Already on GitHub? [ Sign in ](/login?return_to=%2Fros-
planning%2Fmoveit2%2Fissues%2Fnew%2Fchoose) to your account


[ destogl  ](https://discourse.ros.org/u/destogl) February 11, 2022, 1:45pm  6


[
![@ShotaAk](https://avatars.githubusercontent.com/u/18494952?s=40&u=a667bf5de7c93b116f1a71ad9a7b8619e58213f0&v=4)
](/ShotaAk) [ ShotaAk ](/ShotaAk) changed the title ~~Source build fails~~ Use
new ros2_control interfaces  Sep 21, 2020


* Solutions


> That’s fine, but to do a proper control, you should know the exact rate at
> which the controller is running. Otherwise, you will never get perfect
> trajectories.


  * [ Code  ](/ros-planning/moveit2)
  * [ Issues  ](/ros-planning/moveit2/issues)
  * [ Pull requests  ](/ros-planning/moveit2/pulls)
  * [ Discussions  ](/ros-planning/moveit2/discussions)
  * [ Actions  ](/ros-planning/moveit2/actions)
  * [ Projects  ](/ros-planning/moveit2/projects)
  * [ Security  ](/ros-planning/moveit2/security)
  * [ Insights  ](/ros-planning/moveit2/pulse)


The ` colcon build ` command of [ MoveIt 2 Source Build - Linux
](https://moveit.ros.org/install-moveit2/source/) fails with log message `
hardware_interface/joint_command_handle.hpp: No such file or directory ` .


[ @ShotaAk ](https://github.com/ShotaAk) Thanks for reporting, we've already
realized that ` ros2_control ` had some breaking changes lately. Until then,
it probably makes most sense to fix the commit hash in the repos file and bump
the version from time to time until there is a stable API. Were you able to
run the demo successfully with an older version?

---

All reactions


With ros_control in ROS1, sending position goals via an action client worked
perfectly well. What am I doing wrong? Is there anything I am missing?


##  Comments


[ ![Logo](../../../../_static/logo_ros-controls.png) ](../../../../index.html)

  * [ Getting Started ](../../../getting_started/getting_started.html)
  * [ ros2_control ](../../doc/index.html)
    * [ API Documentation ](../../doc/index.html


Name


The ` FollowJointTrajectory  ` or ` GripperCommand  ` interfaces on your robot
must be communicating in the namespace: ` /name/action_ns  ` . In the above
example, you should be able to see the following topics (using _ros2 topic
list_ ) on your robot:


Contributor  Author


PS: could you please post these kinds of questions on ROS Answers instead in
the future?


don’t do this.


I understand. Anyway, I will create a PR.

---

All reactions


Sorry, something went wrong.


[
![@ShotaAk](https://avatars.githubusercontent.com/u/18494952?s=80&u=a667bf5de7c93b116f1a71ad9a7b8619e58213f0&v=4)
](/ShotaAk)


Skip to content


|  8  |  6407  |  December 11, 2023
[ Ros2 support for KUKA iiwa ](https://discourse.ros.org/t/ros2-support-for-
kuka-iiwa/24735)


[ destogl  ](https://discourse.ros.org/u/destogl) February 11, 2022, 2:10pm  8


Copy link


Sign up for GitHub


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


[ mhubii  ](https://discourse.ros.org/u/mhubii) February 11, 2022, 11:25am  1


**[ ShotaAk ](/ShotaAk) ** commented  Sep 17, 2020


    * [ Enterprise ](/enterprise)
    * [ Teams ](/team)
    * [ Startups ](/enterprise/startups)
    * [ Education  ](https://education.github.com)


![](https://sea2.discourse-
cdn.com/business7/user_avatar/discourse.ros.org/mhubii/48/5381_2.png) mhubii:


For each controller it is optional to set the
_allowed_execution_duration_scaling_ and _allowed_goal_duration_margin_
parameters. These are controller-specific overrides of the global values
_trajectory_execution/allowed_execution_duration_scaling_ and
_trajectory_execution/allowed_goal_duration_margin_ . As opposed to the global
values, the contoller-specific ones cannot be dynamically reconfigured at
runtime. The parameters are used to compute the allowed trajectory execution
duration by scaling the expected execution duration and adding the margin
afterwards. If this duration is exceeded the trajectory will be cancelled. The
controller-specific parameters can be set as follows


[ @henningkayser ](https://github.com/henningkayser) [ @ShotaAk
](https://github.com/ShotaAk) we are braking a lot currently in ` ros2_control
` in a month or so we should fix new interfaces. If you could use the versions
from the [ comment ](https://github.com/ros-
planning/moveit2/issues/283#issuecomment-694193363) it would be great :)

---

👍  2  ShotaAk and henningkayser reacted with thumbs up emoji


* [ Pricing ](/pricing)


Reproduce procedure is same as the [ MoveIt 2 Source Build guide
](https://moveit.ros.org/install-moveit2/source/) .


[
![@schornakj](https://avatars.githubusercontent.com/u/14431472?s=80&u=fcccfc4fa3bebac047c907adad078dc822f22ccc&v=4)
](/schornakj)


1 Like


[ mhubii  ](https://discourse.ros.org/u/mhubii) February 15, 2022, 4:06pm  11


  Different update rates for Hardware Components  

In the following sections you can find some advice which will help you to
implement Hardware Components with update rates different from the main
control loop.


Closed


#  Provide feedback


> Since most projects just use one controller per set of joints, it's probably
> acceptable to replace the TEM's controller search logic with some simple
> condition, like picking the first currently-active controller that controls
> the joints actuated by the trajectory.


ah okay, sorry I didn’t know. I just heard your recent talk about admittance
control [ Online Trajectory Generation and Admittance Contro | PickNik
](https://picknik.ai/ros/robotics/moveit/2022/02/07/admittance-control-in-
ROS2.html) , good talk btw, where you recommended to use ruckig, and then
assumed MoveIt2 would default to it, too [ moveit2/ruckig_traj_smoothing.h at
main · ros-planning/moveit2 · GitHub ](https://github.com/ros-
planning/moveit2/blob/main/moveit_core/trajectory_processing/include/moveit/trajectory_processing/ruckig_traj_smoothing.h)
. But this was obviously wrong then. Thanks for letting me know [ @AndyZe
](/u/andyze) .


* _action_ns_ : The action namespace for the controller. (See debugging information below for important notes).


* _name_ : The name of the controller. (See debugging information below for important notes).


Sorry, something went wrong.


>   * /panda_arm_controller/follow_joint_trajectory/goal
>
>   * /panda_arm_controller/follow_joint_trajectory/feedback
>
>   * /panda_arm_controller/follow_joint_trajectory/result
>
>   * /hand_controller/gripper_action/goal
>
>   * /hand_controller/gripper_action/feedback
>
>   * /hand_controller/gripper_action/result
>
>


**[ schornakj ](/schornakj) ** commented  Apr 14, 2022


[ Search syntax tips ](https://docs.github.com/search-github/github-code-
search/understanding-github-code-search-syntax)


Copy link


* [ The ReadME Project  GitHub community articles  ](/readme)


I am trying to send a sinusoidal motion to the first joint, all other joint
positions are set to zero. Therefore, at each step, I send a trajectory `
control_msgs::action::FollowJointTrajectory ` with a **single** point, using
an action client. I feel like the robot has not reached the target position,
when the new command arrives. Should I use `
position_controllers/JointGroupPositionController ` instead?


**[ ShotaAk ](/ShotaAk) ** commented  Sep 21, 2020


* Open Source


##  Controllers for Multiple Nodes  


[ schornakj ](/schornakj) opened this issue  Apr 14, 2022  · 7 comments


###  Actual behaviour


Closed


[ bug  ](/ros-planning/moveit2/labels/bug) Something isn't working


Include my email address so I can be contacted


* Product


[
![@ShotaAk](https://avatars.githubusercontent.com/u/18494952?s=40&u=a667bf5de7c93b116f1a71ad9a7b8619e58213f0&v=4)
](/ShotaAk) [ ShotaAk ](/ShotaAk) mentioned this issue  Sep 25, 2020


Contributor


[
![@AndyZe](https://avatars.githubusercontent.com/u/11284393?s=80&u=24eb488e02f9d9ce574f09c9025fa15d8f3814e6&v=4)
](/AndyZe)


Development


Successfully merging a pull request may close this issue.


Documentation Version


Sign up for GitHub


[ mhubii  ](https://discourse.ros.org/u/mhubii) February 11, 2022, 2:32pm  9


For


Query


My hardware interface is called [ ` diffdrive_arduino `
](https://github.com/joshnewans/diffdrive_arduino) , and all it does is expose
the two velocity command interfaces (one for each motor), and the velocity and
position state interfaces. Underneath, it’s simply just sending those “m” and
“e” commands over serial that we saw in the motor tutorial ( _which never got
a written version…oops!_ ). Remember, the ` diff_drive_controller ` will be
handling the actual control allocation.


[ 077bei004.aarjan  ](https://get-help.theconstruct.ai/u/077bei004.aarjan)
February 12, 2024, 5:39pm  1


> Writing your own hardware interface is out of the scope of this tutorial,
> but if people are interested let me know, because they changed the API after
> foxy, and so I need to rewrite mine for people on newer distros, and that
> might be a good opportunity to talk through it.


    return LaunchDescription([
        rsp,
        delayed_controller_manager,
        delayed_diff_drive_spawner,
        delayed_joint_broad_spawner
    ])

---|---
`


##  Update the URDF


    # At the top with our imports
    from launch.actions import RegisterEventHandler
    from launch.event_handlers import OnProcessStart
    ...
    # Directly below the current spawners
    delayed_diff_drive_spawner = RegisterEventHandler(
            event_handler=OnProcessStart(
                target_action=controller_manager,
                on_start=[diff_drive_spawner],
            )
        )
    delayed_joint_broad_spawner = RegisterEventHandler(
            event_handler=OnProcessStart(
                target_action=controller_manager,
                on_start=[joint_broad_spawner],
            )
        )

---|---
`


       # rviz_config_file = PathJoinSubstitution(
    #     [FindPackageShare("car_gazebo"), "rrbot/rviz", "rrbot.rviz"]
    # )

       control_node = Node(
        package="controller_manager",
        executable="ros2_control_node",
        parameters=[robot_description, robot_controllers],
        output="both",
    )

       robot_state_pub_node = Node(
        package="robot_state_publisher",
        executable="robot_state_publisher",
        output="both",
        parameters=[robot_description],
    )

       rviz_node = Node(
        package="rviz2",
        executable="rviz2",
        name="rviz2",
        output="log",
        condition=IfCondition(gui),
    )

       joint_state_broadcaster_spawner = Node(
        package="controller_manager",
        executable="spawner",
        arguments=["joint_state_broadcaster",
                   "--controller-manager", "/controller_manager"],
    )

       robot_controller_spawner = Node(
        package="controller_manager",
        executable="spawner",
        arguments=["ackermann_steering_base_controller",
                   "--controller-manager", "/controller_manager"],
    )


Remember that previously we had disabled ` use_sim_time ` in the `
my_controller_params.yaml ` file? The problem is that for Gazebo we want this
to be turned on. This is a bit messy, and it all comes down to the `
gazebo_ros2_control ` plugin, so let’s swap back to ` ros2_control.xacro ` .


[ README.md ](/PickNikRobotics/topic_based_ros2_control/blob/main/README.md
"README.md")

|

|


[ The Construct ROS Community ](/)


  * Prop the robot back up.
  * Restart the controller so that the wheel axes are reset in RViz and note which way they are pointing (e.g. Y is pointing up).
  * Set the RViz fixed frame to something robot-fixed (e.g. ` base_link ` )
  * Put a marker (e.g. some tape) on the wheel.
  * Drive forward for a while (e.g. 30 revolutions) and stop with the marker in the same spot


##  Controlling our robot with ros2_control


> It would be nice to be able to just ` sudo apt install diffdrive arduino `
> but unfortunately we can’t do that just yet. Right now my driver depends on
> a great serial library which was never officially updated and released for
> ROS 2. There is a source port though, so we’re going to have to add it to
> our workspace and compile it ourselves. At some point I might rewrite my
> code to use a different library which IS available, but I did like that one
> so William or Scott if you’re listening, please consider a ros 2 release. If
> that ever happens or I rewrite it, I’ll release mine as well so that you can
> install it all through apt.


  * The wheels spinning in the expected direction
  * The RViz display moving as if the robot were actually driving (it doesn’t know the wheels are spinning in the air!)
  * All the transforms etc. are displayed with no errors


[ topic_based_ros2_control_plugin_description.xml
](/PickNikRobotics/topic_based_ros2_control/blob/main/topic_based_ros2_control_plugin_description.xml
"topic_based_ros2_control_plugin_description.xml")

|


  License

BSD-3-Clause license

[ Activity  ](/PickNikRobotics/topic_based_ros2_control/activity)

[ Custom properties  ](/PickNikRobotics/topic_based_ros2_control/custom-
properties)


###  Getting the controller params


    <gazebo>
        <plugin filename="libgazebo_ros2_control.so" name="gazebo_ros2_control">
            <parameters>$(find articubot_one)/config/my_controllers.yaml</parameters>
            <parameters>$(find articubot_one)/config/gaz_ros2_ctl_sim.yaml</parameters>
        </plugin>
    </gazebo>

---|---
`


![Wheel separation test](/media/assets/posts/mobile-robot/13-ros2-control-
real/sepdist.png)


in a Human-Robot-Interaction (HRI) scenario with the robot
giving audio feedback for the user. Our results show that the
proposed model achieves high classification rates of the gestures
executed by different subjects, who perform them with varying
speed. We demonstrate that our system performs in real-time.
I. INTRODUCTION
There is a trend in the robotic community towards integration of robots into assistive systems in everyday life
situations and different areas, e.g. in medical surgery or
helping systems for elderly people [1].
In the context of humanoid robots, the demand for intuitive communication interfaces for natural Human-RobotInteraction (HRI) is increasing. The most significant aspects
for HRI comprise the correct understanding and processing
of the user input, robustness concerning varying environmental situations and realtime recognition performance.
In the area of gesture recognition several different approaches have been established using different input devices and learning algorithms. Among them, development
of neurally inspired algorithms is of special interest as they
offer a model for brain-like stimuli processing, which allows
adaption to a changing environment, is robust against noise
and provides instantaneous reactions. Before performing gestures ourselves, we first perceive them as visual stimuli over
time,which motivates us using neural computational models,
in particular Convolutional Neural Networks (CNN).
CNN has been introduced as a computational approach
which mirrors the hierarchical stages for visual processing
in the visual cortex. An incoming visual percept is processed in a simple cell layer extracting edge features. The
outcome of this extraction is then passed to complex cells
in the next layer, where these features are pooled together.
These computations alternate between the cell types until
the neurons show high coding specificity and are invariant to
scale, rotation and noise. This approach has been successfully
applied to object recognition where only single images
The authors are with University of Hamburg - Department of Computer
Science, Vogt-Koelln-Strasse 30, 22527 Hamburg - Germany.
barros,parisi,jirak,wermter
@informatik.uni-hamburg.de
were used for classification. A prominent example is the
cipher classification introduced in [2]. A similar approach
called HMAX [3] performs template matching and pooling
operations from Gabor filtering at different scales and with
different orientations. It showed very good recognition rates
on benchmark object databases, which underlines the crucial
impact of implementing a cascading visual system to obtain
invariant and insensitive features.


    parameters=[{'robot_description': robot_description},
                    controller_params],

---|---
`


In the previous tutorial we got all this working with a simulated robot, and a
Gazebo-integrated controller manager, but this time we’ll be doing it with a
regular controller manager, our own hardware interface, on a real robot!


[ ![Articulated Robotics](/assets/images/logo3.png) ](/)


  * Left and right wheel joint names
  * Arduino loop rate
  * Serial port
  * Baud rate
  * Comms timeout
  * Encoder counts per revolution


Powered by [ Discourse ](https://www.discourse.org) , best viewed with
JavaScript enabled


[ .clang-tidy ](/PickNikRobotics/topic_based_ros2_control/blob/main/.clang-
tidy ".clang-tidy")

|


It will securely connect your ABB Ability™ System 800xA to ABB Ability™ Edgenius in just a few simple steps. The 800xA Publisher is all about secure communication. Following the Namur Open Architecture (NOA) who is mastering the complexity of connectivity. Same Aspect Objects as in 800xA can be used making operational data available for visualization, analysis and action.


Share


##  Launch file


  [ Packages  0
](/orgs/PickNikRobotics/packages?repo_name=topic_based_ros2_control)

No packages published


[ doc ](/PickNikRobotics/topic_based_ros2_control/tree/main/doc "doc")

|


For this to work, we need a hardware interface for our robot. I’ve written one
that you can use if you are using the same Arduino motor control code that I
am, otherwise you’ll need to find one online or write your own. [ Here’s an
example ](https://github.com/youtalk/dynamixel_control) of one I found (have
not tested) for Dynamixel motors.


Is easy to install as it’s a system extension to system 800xA is providing configuration aspects as templates
Its cybersecure as you can decide and configure what data is available for digital applications from System 800xA, and all communication is secured using mTLS.
Does not put your 800xA system at risk, as it only publishes the selected data, but it doesn’t read data from Edgenius (Data Diode)


[ package.xml
](/PickNikRobotics/topic_based_ros2_control/blob/main/package.xml
"package.xml")

|

|


  * Place the robot on a large surface and note the wheel locations (e.g. with tape on the ground).
  * Make another marker at a known distance ahead (e.g. 1m)
  * Restart the controller so that the origin is reset in RViz (fixed frame doesn’t matter too much but ` odom ` is best)
  * Drive the robot until the wheels are aligned with the marker


    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17


  History

[ 14 Commits  ](/PickNikRobotics/topic_based_ros2_control/commits/main/)

[ ](/PickNikRobotics/topic_based_ros2_control/commits/main/)


Reducing maintenance costs
Avoid unplanned downtime
Reducing energy consumption
Improving process and product quality


**This is the code from
ackermann_steering_controller/src/ackermann_steering_controller.cpp Maybe the
problem is causing due to**


[ .github/  workflows
](/PickNikRobotics/topic_based_ros2_control/tree/main/.github/workflows "This
path skips through empty directories")

|


Let’s open up the ` ros2_control.xacro ` file we made in the last video. Here
we will find the ` <ros2_control> ` block we wrote in the last tutorial to
describe our hardware interface when we were using Gazebo, but now we need one
for the real system.


                    "car.urdf.xacro",
                ]
            ),
        ]
    )
    robot_description = {"robot_description": robot_description_content}

       joint_state_publisher_node = Node(
        package="joint_state_publisher_gui",
        executable="joint_state_publisher_gui",
        condition=IfCondition(gui),
    )
    robot_state_publisher_node = Node(
        package="robot_state_publisher",
        executable="robot_state_publisher",
        output="both",
        parameters=[robot_description],
    )
    rviz_node = Node(
        package="rviz2",
        executable="rviz2",
        name="rviz2",
        output="log",
        condition=IfCondition(gui),
    )

       nodes = [
        joint_state_publisher_node,
        robot_state_publisher_node,
        rviz_node,
    ]

       return LaunchDescription(declared_arguments + nodes)


[ test ](/PickNikRobotics/topic_based_ros2_control/tree/main/test "test")

|


Because we’re in the real world now we want to make sure that we set `
use_sim_time ` to false in both:


However I configured the ros2_controller/ackermann_steering_controller in my
project but it didnt work as expected and threw some errors at last of this
post.


    #include "pluginlib/class_list_macros.hpp"

    // <controller_name_namespace>::<ControllerName>
    // second the base class, controller_interface::ControllerInterface.
    PLUGINLIB_EXPORT_CLASS(
        ackermann_steering_controller::AckermannSteeringController,
        controller_interface::ChainableControllerInterface)


  Repository files navigation

  * README
  * BSD-3-Clause license


    1
    2
    3


##  Explore  →


  * Add another argument line in our main ` robot.urdf.xacro ` and call it ` sim_mode ` , defaulted to ` false ` .
  * In ` ros2_control.xacro ` , wrap the “real version” in ` <xacro:unless value="$(arg sim_mode)"> ` , and the Gazebo version (uncommented) in ` <xacro:if value="$(arg sim_mode)"> ` .
  * In ` rsp.launch.py ` , expand our xacro command to read as below. Whenever ` use_sim_time ` is true, we will be enabling ` sim_mode ` .


  * Make a copy of the Gazebo one and comment out the original. We’ll come back to it later so we can toggle between them.
  * Change the name (e.g. to ` "RealRobot" ` ).
  * Change the plugin to ` diffdrive_arduino/DiffDriveArduino `
  * Add the parameters for the hardware interface.


    <ros2_control name="RealRobot" type="system">
        <hardware>
            <plugin>diffdrive_arduino/DiffDriveArduino</plugin>
            <param name="left_wheel_name">left_wheel_joint</param>
            <param name="right_wheel_name">right_wheel_joint</param>
            <param name="loop_rate">30</param>
            <param name="device">/dev/ttyUSB0</param>
            <param name="baud_rate">57600</param>
            <param name="timeout">1000</param>
            <param name="enc_counts_per_rev">3436</param>
        </hardware>
        <!-- Note everything below here is the same as the Gazebo one -->
        <joint name="left_wheel_joint">
            <command_interface name="velocity">
                <param name="min">-10</param>
                <param name="max">10</param>
            </command_interface>
            <state_interface name="velocity"/>
            <state_interface name="position"/>
        </joint>
        <joint name="right_wheel_joint">
            <command_interface name="velocity">
                <param name="min">-10</param>
                <param name="max">10</param>
            </command_interface>
            <state_interface name="velocity"/>
            <state_interface name="position"/>
        </joint>
    </ros2_control>

---|---
`


[ LICENSE ](/PickNikRobotics/topic_based_ros2_control/blob/main/LICENSE
"LICENSE")

|

|


  Resources

Readme


  * The ` diff_drive_controller ` plugin, provided by ` ros2_controllers ` , which turns our command velocity into abstract wheel velocities
  * The hardware interface plugin, provided by us, which turns abstract wheel velocities into signals for the motor controller (e.g. via serial commands)
  * The controller manager, provided by ros2_control, in this case using the ` ros2_control_node ` , which links everything together


For the controller parameters we just need the path to the params file, and
for that we can can use the same ` os.path.join ` function we have in other
places.


    [ros2_control_node-1] #14   Source "../csu/libc-start.c", line 392, in __libc_start_main_impl [0x7fcd9d629e3f]
    [ros2_control_node-1] #13   Source "../sysdeps/nptl/libc_start_call_main.h", line 58, in __libc_start_call_main [0x7fcd9d629d8f]
    [ros2_control_node-1] #12   Object "/opt/ros/humble/lib/controller_manager/ros2_control_node", at 0x55fb7f78889e, in
    [ros2_control_node-1] #11   Object "/opt/ros/humble/lib/libcontroller_manager.so", at 0x7fcd9e0b5719, in controller_manager::ControllerManager::ControllerManager(std::shared_ptr<rclcpp::Executor>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::NodeOptions const&)
    [ros2_control_node-1] #10   Object "/opt/ros/humble/lib/libcontroller_manager.so", at 0x7fcd9e0b0e04, in controller_manager::ControllerManager::init_resource_manager(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
    [ros2_control_node-1] #9    Object "/opt/ros/humble/lib/libhardware_interface.so", at 0x7fcd9dd18d9d, in hardware_interface::ResourceManager::load_urdf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool)
    [ros2_control_node-1] #8    Object "/opt/ros/humble/lib/libhardware_interface.so", at 0x7fcd9dd171ce, in
    [ros2_control_node-1] #7    Object "/opt/ros/humble/lib/libhardware_interface.so", at 0x7fcd9dcf832a, in
    [ros2_control_node-1] #6    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7fcd9daae4d7, in __cxa_throw
    [ros2_control_node-1] #5    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7fcd9daae276, in std::terminate()
    [ros2_control_node-1] #4    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7fcd9daae20b, in
    [ros2_control_node-1] #3    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7fcd9daa2b9d, in
    [ros2_control_node-1] #2    Source "./stdlib/abort.c", line 79, in abort [0x7fcd9d6287f2]
    [ros2_control_node-1] #1    Source "../sysdeps/posix/raise.c", line 26, in raise [0x7fcd9d642475]
    [ros2_control_node-1] #0  | Source "./nptl/pthread_kill.c", line 89, in __pthread_kill_internal
    [ros2_control_node-1]     | Source "./nptl/pthread_kill.c", line 78, in __pthread_kill_implementation
    [ros2_control_node-1]       Source "./nptl/pthread_kill.c", line 44, in __pthread_kill [0x7fcd9d6969fc]
    [ros2_control_node-1] Aborted (Signal sent by tkill() 25905 1000)

    [ERROR] [ros2_control_node-1]: process has died [pid 25905, exit code -6, cmd '/opt/ros/humble/lib/controller_manager/ros2_control_node --ros-args --params-file /tmp/launch_params_8qnwt2ax --params-file /home/aarjan/minor_ros/install/car_gazebo/share/car_gazebo/config/ackermann_steering_controller.yaml'].
    [spawner-3] [INFO] [1707754411.348236298] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' node to exist
    [spawner-3] [INFO] [1707754413.365302157] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' node to exist
    [spawner-3] [INFO] [1707754415.384160723] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' node to exist
    [spawner-3] [INFO] [1707754417.401642295] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' node to exist
    [spawner-3] [ERROR] [1707754419.422091681] [spawner_joint_state_broadcaster]: Controller manager not available
    [ERROR] [spawner-3]: process has died [pid 25909, exit code 1, cmd '/opt/ros/humble/lib/controller_manager/spawner joint_state_broadcaster --controller-manager /controller_manager --ros-args'].
    [INFO] [spawner-4]: process started with pid [26024]
    [INFO] [rviz2-5]: process started with pid [26026]
    [rviz2-5] [INFO] [1707754419.880410912] [rviz2]: Stereo is NOT SUPPORTED
    [rviz2-5] [INFO] [1707754419.880543949] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
    [rviz2-5] [INFO] [1707754419.895533589] [rviz2]: Stereo is NOT SUPPORTED

    [rviz2-5] [WARN] [1707754419.957731402] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
    [rviz2-5] [WARN] [1707754419.960753279] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
    [spawner-4] [INFO] [1707754421.811967419] [spawner_ackermann_steering_base_controller]: Waiting for '/controller_manager' node to exist
    [spawner-4] [INFO] [1707754423.832159604] [spawner_ackermann_steering_base_controller]: Waiting for '/controller_manager' node to exist
    [spawner-4] [INFO] [1707754425.852644375] [spawner_ackermann_steering_base_controller]: Waiting for '/controller_manager' node to exist
    [spawner-4] [INFO] [1707754427.872454754] [spawner_ackermann_steering_base_controller]: Waiting for '/controller_manager' node to exist
    [spawner-4] [ERROR] [1707754429.893425903] [spawner_ackermann_steering_base_controller]: Controller manager not available
    [ERROR] [spawner-4]: process has died [pid 26024, exit code 1, cmd '/opt/ros/humble/lib/controller_manager/spawner ackermann_steering_base_controller --controller-manager /controller_manager --ros-args'].


[ src ](/PickNikRobotics/topic_based_ros2_control/tree/main/src "src")

|

|


**WARNING! Make sure you prop your robot up before turning on the controllers
for the first time, in case it sends incorrect values to the motors and sends
the robot flying!**


    controller_manager:
      ros__parameters:
        update_rate: 30

        joint_state_broadcaster:
          type: joint_state_broadcaster/JointStateBroadcaster

        ackermann_steering_base_controller:
          type: ackermann_steering_controller/AckermannSteeringController

    ackermann_steering_base_controller:
      ros__parameters:

        reference_timeout: 2.0
        front_steering: true

        rear_wheels_names: [rear_left_wheel_joint, rear_right_wheel_joint]
        front_wheels_names: [left_steering_joint, right_steering_joint]

        open_loop: false
        velocity_rolling_window_size: 10

        publish_rate: 50.0
        odom_frame_id: odom
        base_frame_id: base_link

        enable_odom_tf: true

        twist_covariance_diagonal: [0.0, 7.0, 14.0, 21.0, 28.0, 35.0]
        pose_covariance_diagonal: [0.0, 7.0, 14.0, 21.0, 28.0, 35.0]

        position_feedback: false
        use_stamped_vel: false

        wheelbase: 0.46
        front_wheel_track: 1.8
        rear_wheel_track: 1.8
        front_wheels_radius: 0.115


    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29


The steps to do that are:


[ test ](/PickNikRobotics/topic_based_ros2_control/tree/main/test "test")

|

|


“80% of data is stranded and not included in most processes…”
For 800xA systems there is a specific connect which is the 800xA Publisher, who:


[ « Making a Mobile Robot #12a - ros2_control extra bits
](https://articulatedrobotics.xyz/mobile-robot-12a-ros2-control-extra/) [
Making a Mobile Robot #14a - Teleoperation »
](https://articulatedrobotics.xyz/mobile-robot-14a-teleop/)


To get the hardware interface we’ll clone from my GitHub into our workspace
and build it from source. It also needs a copy of the serial library it
depends on, and to keep things simple I’ve made my own fork (of a different
fork). So let’s hop onto the Pi and clone those into our workspace, then build
them.


  Stars

[ **49** stars ](/PickNikRobotics/topic_based_ros2_control/stargazers)


Could you please help me tackling this error or have some solution that might
help me…


[ system  ](https://get-help.theconstruct.ai/u/system) Closed  February 22,
2024, 5:40pm  2


  Footer

[ ](https://github.com "GitHub") © 2024 GitHub, Inc.


−1 0 +1

 , Sy =


+1 +2 +1
0 0 0
−1 −2 −1

 . (2)
The utilization of the Sobel filters helps in the discrimination of the motion shape in the image. When applied in
both directions these filters can detail the shape aspects of
the motion. The channel that receives the original image
is responsible to extract the time structure created by the
weighted shadows.
To create a feature set invariant to position and scale, a
cubic kernel implementation is used. In the CNN implementation the convolution layers are applied as 2D filter
maps, each one with independent weights, to be robust
against noise and small changes in the pixels intensities
[2]. The cubic kernel allows the application of a 3D filter
in a stack of images. Each filter map has 3D kernels, still
with independent weights, that are applied to a sequence
of images of the same motion representation. In the cubic
implementation, the value of each unit(x,y,z) at the nth filter
map in the cth layer is defined as:
v
xyz
nc = tanh(bcn+
X
m
H
Xi−1
h=0
W
Xi−1
w=0
R
Xi−1
r=0
w


> Note: As of writing this tutorial, this functionality has only just been
> added and has not been pushed to the package repositories. Until then,
> you’ll need to build ` gazebo_ros2_control ` yourself by running ` git clone
> -b foxy https://github.com/ros-controls/gazebo_ros2_control ` in your dev
> workspace.


[ .clang-format ](/PickNikRobotics/topic_based_ros2_control/blob/main/.clang-
format ".clang-format")

|

|


Read more in the System 800xA Publisher data sheet here!
Read more in the ABB Ability™ Edgenius whitepaper here!


    def generate_launch_description():
    # Declare arguments
    declared_arguments = []
    declared_arguments.append(
        DeclareLaunchArgument(
            "gui",
            default_value="true",
            description="Start RViz2 automatically with this launch file.",
        )
    )

       # Initialize Arguments
    gui = LaunchConfiguration("gui")

       # Get URDF via xacro
    robot_description_content = Command(
        [
            PathJoinSubstitution([FindExecutable(name="xacro")]),
            " ",
            PathJoinSubstitution(
                [
                    FindPackageShare("car_gazebo"),
                    "urdf",
                    "car.urdf.xacro",
                ]
            ),
        ]
    )

       robot_description = {"robot_description": robot_description_content}

       robot_controllers = PathJoinSubstitution(
        [
            FindPackageShare("car_gazebo"),
            "config",
            "ackermann_steering_controller.yaml",
        ]
    )


[ include/  topic_based_ros2_control
](/PickNikRobotics/topic_based_ros2_control/tree/main/include/topic_based_ros2_control
"This path skips through empty directories")

|


[ Mediumish Jekyll Theme ](https://www.wowthemes.net/mediumish-free-jekyll-
template/) by WowThemes.net


  Topic Based Ros2 Control

Description: This is a ROS 2 package for integrating the ros2_control with any
system that uses topics to command the robot and publish its state.

[ ![Build and Test
\(humble\)](https://github.com/JafarAbdi/topic_based_ros2_control/actions/workflows/build_and_test.yaml/badge.svg)
](https://github.com/JafarAbdi/topic_based_ros2_control/actions/workflows/build_and_test.yaml)


Although the command velocity is going to be a ROS topic of type ` Twist ` (or
` TwistStamped ` as we’ll see in the next video), that is a 6-dimensional
velocity but since this particular robot’s motion is constrained to move
forwards and backwards in X, and rotate around Z, we’ll only use two of the
values ( ` linear.x ` and ` angular.z ` ).


**2. Wheel radius**


Mastering the complexity of connectivity
Namur Open Architecture (NOA)
Benefits of digitalization:


    controller_manager:
      ros__parameters:
        use_sim_time: true

---|---
`


  * Controlling our robot with ros2_control
  * Getting the hardware interface
  * Update the URDF
  * Launch file
    * Add the controller manager node
    * Getting the robot description
    * Getting the controller params
    * Don’t use sim time
    * Delaying our nodes
  * Testing it out!
    * Basic driving
    * Odometry accuracy
    * Sensor Integration
  * Unbreaking Gazebo
    * Xacro switch
    * Controller sim time
  * Conclusion


  PickNikRobotics/topic_based_ros2_control

This commit does not belong to any branch on this repository, and may belong
to a fork outside of the repository.

main

[ Branches  ](/PickNikRobotics/topic_based_ros2_control/branches) [ Tags
](/PickNikRobotics/topic_based_ros2_control/tags)

[ ](/PickNikRobotics/topic_based_ros2_control/branches) [
](/PickNikRobotics/topic_based_ros2_control/tags)

Go to file

Code


  * [ Home ](/)
  * [ Categories ](/categories)
  * [ FAQ/Guidelines ](/guidelines)
  * [ Terms of Service ](http://www.theconstructsim.com/terms_and_conditions/)
  * [ Privacy Policy ](http://www.theconstructsim.com/privacy_policy/)


    cmake_minimum_required(VERSION 3.8)

    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)
    # uncomment the following section in order to fill in
    # further dependencies manually.
    # find_package(<dependency> REQUIRED)

    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()
    endif()

    install(
      DIRECTORY launch rviz config worlds transforms src urdf
      DESTINATION share/${PROJECT_NAME}
    )

    ament_package()


[ CMakeLists.txt
](/PickNikRobotics/topic_based_ros2_control/blob/main/CMakeLists.txt
"CMakeLists.txt")

|

|


    1
    2
    3
    4
    5
    6


This topic was automatically closed 10 days after the last reply. New replies
are no longer allowed.


Deep learning architectures are also prominently applied
in different areas of HRI. For autonomous robotic behaviour
the work presented in [4] demonstrated higher recognition
rates using a max-pooling CNN (MPCNN) compared to
other learning methods like SVM. The idea was to provide
a swarm of mobile robots with reliable vision information
derived from counting gestures which are performed using
a coloured glove. Although the authors could show superior
performance of their architecture in terms of 96% recognition
rate and real-time processing they did not model the temporal
dimension.
To bridge the gap, a more recent approach for action
recognition [5] extends CNN with 3D kernels capturing motion information along the frames of an action performance
stream. Instead of using single images for convolution,
the whole computation is performed on a frame cube of
predefined size, i.e. frames to consider in the video. The
feature maps are created using different kernels to increase
the diversity of features. Moreover, the author described
extraction of high-level motion information by defining auxiliary features presented to the architecture as bag-of-words
and added to the output layer. The system was evaluated with
an airport surveillance database that contains three action
types and showed superior results compared to other models
like spatial pyramidal matching features. Also for the KTH
benchmark DB for action recognition, e.g. boxing and hand
clapping, the results were competitive to [6] and superior to
an unsupervised probabilistic learning approach on extracted
time-space points of interest [7].
As our work focuses on dynamic gestures, we also have to
deal with different timescales and long-range dependencies
to capture the gestures’ semantics. The different demands
on a gesture recognition system combined in a model are
described in [8], based on data captured with a Kinect
depth sensor. The stream is separated into depth information
employed as input to a four-layer CNN for each hand and
into a skeleton part for the whole body motion. The first
stage is referred to as dynamic pose and catches only local
information. The output of the different computational steps
is then aggregated and serves as input to a Recurrent Neural
Network. They evaluated their system on the ChaLearn 2013
data set for fused audio and vision recognition and could


[ include/  topic_based_ros2_control
](/PickNikRobotics/topic_based_ros2_control/tree/main/include/topic_based_ros2_control
"This path skips through empty directories")

|

|


the weighted shadows imprinted in the motion representation
Fig. 3: Illustration of the five commands and standing position in the recorded dataset. Following each sequence it is an
example of the motion image generated by the proposed model.
image. The two channels with the Sobel filters will be
strongly trained to extract the motion shape patterns, with
highlighted edges in both directions, horizontal and vertical.
After the filters are trained, the hidden layer and logistic
regression can be detached of the model and the filters can
be used to extract features for other classifiers. Figure 2
illustrates the whole process of feature extraction after the
model is trained. In the example, the model has 2 layers,
each one composed of a pair of a convolutional and a maxpooling layer. At the end, three feature sets, each one with
3x3 pixels, are used to represent the full gesture.
III. EXPERIMENTS
We set up two experiments to evaluate our model. One,
aimed to evaluate the recognition rate, training time and
recognition time for the proposed model, was called the
offline experiment. The other one applied the trained filters
in a real-time recognition scenario with a humanoid robot
called the Nimbro experiment.
For the offline experiment, a data set containing six
classes was recorded. The classes represent five gesture
commands and a standing position with no gesture execution.
The commands are as follows: ’Circle’, ’Point Left’, ’Point
Right’, ’Stop’, and ’Turn’. The data set contains 60 examples
for each gesture, executed by one subject. Each frame has
a resolution of 640x480 pixels and each gesture sequence
has varying amounts of frames. In sum, 360 videos were
recorded, and illustrations of the gestures are shown in Figure
3.
The learning was executed with the dataset separated
into 60% of the gestures for training and 40% for testing.
The frames were resized to 100x100 pixels and all the
frames were used to compose the motion representation.
The MCCNN was implemented with a depth of two layers
and connected to the hidden layer and logistic regression
classifier for training the filters. We performed experiments
with different parameter values, following the indications of
[11], and the best performing parameters are shown in Table
I.


  Use saved searches to filter your results more quickly

Name

Query

To see all available qualifiers, see our [ documentation
](https://docs.github.com/search-github/github-code-search/understanding-
github-code-search-syntax) .

Cancel  Create saved search

[ Sign in
](/login?return_to=https%3A%2F%2Fgithub.com%2FPickNikRobotics%2Ftopic_based_ros2_control%3Ftab%3Dreadme-
ov-file)

[ Sign up
](/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-
name%3E%2F%3Crepo-name%3E&source=header-
repo&source_repo=PickNikRobotics%2Ftopic_based_ros2_control)

You signed in with another tab or window. [ Reload ]() to refresh your
session.  You signed out in another tab or window. [ Reload ]() to refresh
your session.  You switched accounts on another tab or window. [ Reload ]() to
refresh your session.  Dismiss alert

{{ message }}

[ PickNikRobotics ](/PickNikRobotics) /  **[ topic_based_ros2_control
](/PickNikRobotics/topic_based_ros2_control) ** Public

  * [ Notifications ](/login?return_to=%2FPickNikRobotics%2Ftopic_based_ros2_control)
  * [ Fork  11  ](/login?return_to=%2FPickNikRobotics%2Ftopic_based_ros2_control)
  * [ Star  49  ](/login?return_to=%2FPickNikRobotics%2Ftopic_based_ros2_control)

  *

ros2_control hardware interface that uses topics to command the robot and
publish its state


    from launch import LaunchDescription
    from launch.actions import DeclareLaunchArgument
    from launch.conditions import IfCondition from launch.substitutions import Command, FindExecutable, LaunchConfiguration, PathJoinSubstitution
    from launch_ros.actions import Node
    from launch_ros.substitutions import FindPackageShare
    def generate_launch_description():
    # Declare arguments
    declared_arguments = []
    declared_arguments.append(
        DeclareLaunchArgument(
            "description_package",
            default_value="car_gazebo",
            description="Description package with robot URDF/xacro files. Usually the argument \
        is not set, it enables use of a custom description.",
        )
    )

       declared_arguments.append(
        DeclareLaunchArgument(
            "gui",
            default_value="true",
            description="Start Rviz2 and Joint State Publisher gui automatically \
        with this launch file.",
        )
    )

       # Initialize Arguments
    gui = LaunchConfiguration("gui")

       # Get URDF via xacro
    robot_description_content = Command(
        [
            PathJoinSubstitution([FindExecutable(name="xacro")]),
            " ",
            PathJoinSubstitution(
                [
                    FindPackageShare("car_gazebo"),
                    "urdf",


Finally, we want to replace the Gazebo entries with `
delayed_controller_manager ` in our ` LaunchDescription ` at the end.


 Offerings Distributed Control Systems - DCS System 800xA 800xA DCS System 800xA Publisher
ABB Ability™ System 800xA Publisher
Are you looking for support or purchase information?
Contact us
The ABB 800xA Publisher is a system extension leveraging your current data in your control system and plant devices to become more efficient, predictable, and more profitable, without adding risk.


[ .pre-commit-config.yaml
](/PickNikRobotics/topic_based_ros2_control/blob/main/.pre-commit-config.yaml
".pre-commit-config.yaml")

|

|


       # Delay rviz start after `joint_state_broadcaster`
    delay_rviz_after_joint_state_broadcaster_spawner = RegisterEventHandler(
        event_handler=OnProcessExit(
            target_action=joint_state_broadcaster_spawner,
            on_exit=[rviz_node],
        )
    )

       # Delay start of robot_controller after `joint_state_broadcaster`
    delay_robot_controller_spawner_after_joint_state_broadcaster_spawner = RegisterEventHandler(
        event_handler=OnProcessExit(
            target_action=joint_state_broadcaster_spawner,
            on_exit=[robot_controller_spawner],
        )
    )

       nodes = [
        control_node,
        robot_state_pub_node,
        joint_state_broadcaster_spawner,
        delay_rviz_after_joint_state_broadcaster_spawner,
        delay_robot_controller_spawner_after_joint_state_broadcaster_spawner,
    ]

       return LaunchDescription(declared_arguments+nodes)


You might recall from the last video that the two things the controller
manager needs are the robot description (the URDF), and controller parameters.


**Here is CMakeLists.txt raw file**


The launch files are written with reference from ros2_control documentation.
The documentation also contains the demo of ros2_control of different types of
robot, unfortunately there is no ros2_control_demo for robot with ackermann
steering controller.


  * [ __ ](https://www.youtube.com/c/ArticulatedRobotics)
  * [ __ ](https://www.facebook.com/ArticulatedRobotics/)
  * [ __ ](https://twitter.com/articulatedrobo/)
  * [ __ ](https://www.linkedin.com/company/articulated-robotics/)
  * [ __ ](https://github.com/joshnewans/)
  * [ Blog ](/index.html)
  * [ Community ](https://discourse.articulatedrobotics.xyz/)
  * [ About ](/about)
  * [ Support Us! ](/support)


How can I solve this, DO I modify the code in package file or do some other
things?


Then, in ` ros2_control.xacro ` we can add it to the plugin include, so that
we have:


Saved searches


The experiment was performed 30 times and the mean and
standard deviation of the F-Score, recognition and training
TABLE I: Parameters of the MCCNN for training session.
Parameters Layer 1 Layer 2
Filters 20 50
Kernel size 5x5x5 4x4
Sub sampling size 5x5 5x5
Neurons hidden layer 500
Learning rate 0.01
times were collected and are shown in the next section.
In each execution, the data for either training or testing is
randomly chosen. We implemented the system using Python
and Theano1
, running on a machine with an Intel Core I5
processor and 8GB of RAM memory.
For the second experiment we applied our framework to
an HRI scenario with the Nimbro humanoid robot. In this
scenario, the robot is positioned in a room so that it captures
the performing subject frontal to the RGB camera. The robot
gives voice feedback for each recognized gesture in realtime. The Nimbro is 95cm tall and has a weight of 6.6kg
including the battery [12]. It uses a Zotac Zbox Nano XS
PC, running a Linux Ubuntu distribution. This PC has a 1.65
GHz Dual-Core AMD E-50 processor and has 2GB of RAM.
It contains a Logitech C905 USB camera with customized
wide-angle lens, that produces images with a resolution of
640x480 pixels.
The model was deployed in the robot, after training the filters using the recorded dataset, and used for real-time recognition. To provide continuous classification, every frame was
collected and sent to the MCCNN. The experiments with
the robot were conducted with 3 different subjects, each one
executing 10 times each gesture in a random order. None
of the subjects executed the gestures in the recorded dataset.
The mean of the F-Score is shown in the next session. Figure
4 illustrates the scenario for this experiment.
IV. GESTURE RECOGNITION SYSTEM INTERFACE
To be able to give spoken feedback, a communication
system was developed and deployed in the robot. The system
1http://deeplearning.net/software/theano/
Fig. 4: Scenario for the second experiment, using the Nimbro
robot. The Robot is positioned in front of the human and
recognizes the gestures continuously. After each recognition,


In the [ last tutorial ](/mobile-robot-12-ros2-control/) we used ros2_control
to drive our robot in Gazebo, but this time we’re going to step things up and
drive our robot in the real world. It won’t make much sense if you haven’t
read the last tutorial, so make sure you do it first!


#  [ How to solve this ros2_control error? [ros2_control_node-1] what():
According to the loaded plugin descriptions the class
ackermann_steering_controller/AckermannSteeringController with base class type
hardware_interface::SystemInterface does not exist ](/t/how-to-solve-this-
ros2-control-error-ros2-control-node-1-what-according-to-the-loaded-plugin-
descriptions-the-class-ackermann-steering-controller-
ackermannsteeringcontroller-with-base-class-type-hardware-interface-
systeminterface-does-not-exist/28872)


[ doc ](/PickNikRobotics/topic_based_ros2_control/tree/main/doc "doc")

|

|


**Launch file for running the car in real with ros2_control_node and
controller_manager**


Now we need a launch file. We’ll start by making a copy of `
launch_sim.launch.py ` and call it ` launch_robot.launch.py ` . There are a
few things we’ll want to change in here.


The robot should have turned exactly one revolution in RViz. If not, adjust
your wheel separation.


To do this we’ll use a ` Command ` substitution. This will be evaluated at the
time when it goes to run the controller manager, and it will reqest the
contents fo the ` robot_description ` parameter from the `
robot_state_publisher ` node.


In addition to this, we have a controller called a joint state broadcaster.
All this one does is read the motor encoder positions (provided by the
hardware interface) and publish them to the ` /joint_states ` topic for robot
state publisher to generate the wheel transforms. For this kind of robot it’s
not strictly necessary but it makes the system “complete”.


As we send velocity commands, we should see:


The robot description we’re going to get in a bit of an odd way - it was
originally sent as a parameter to ` robot_state_publisher ` in ` rsp.launch.py
` , so we need to get it back out. Unfortunately the controller manager can’t
just read it from the ` /robot_description ` topic the way the `
gazebo_ros2_control ` plugin does (though I’m not sure why!).


[ CONTRIBUTING.md
](/PickNikRobotics/topic_based_ros2_control/blob/main/CONTRIBUTING.md
"CONTRIBUTING.md")

|

|


[ CMakeLists.txt
](/PickNikRobotics/topic_based_ros2_control/blob/main/CMakeLists.txt
"CMakeLists.txt")

|


gesture, meaning that it will have a smaller memory size.
An adjustment of the memory size based on each gesture
execution makes the motion representation robust against
gestures with varying amounts of frames. The utilization
of weighted shadows to create the motion representation
Fig. 2: Illustration of the output of each pair of convolution
and max-pooling operations. This example uses a two layers
MCCNN. Using a motion representation as input, the MCCNN applies a Sobel operator in both directions, horizontal
(X) and vertical (Y). At the end a representation containing
3 feature sets, each one with 3x3 pixels is generated.
is responsible for creating a time feature imprinted in the
final motion image. This representation contains the shape
of the motion and, with the help of the weighted shadows,
the information of when each single posture happened.
B. Spatial and time features fusion
The second step is responsible for identifying and extracting relevant features in the motion representation. To
achieve this, the previous layer is attached to a Multi Channel
Convolutional Neural Network (MCCNN) [9]. The MCCNN
receives an image containing the motion representation and
applies a series of convolutional and max-pooling operations
that, at the end, will generate a feature vector. In the proposed
model an MCCNN with three channels is implemented.
Each channel receives a different version of the motion
image. The first one receives the original motion image. The
second and third receive the resulting image after applying
a Sobel operator in both directions, horizontal(Sx) and
vertical(Sy).The Sobel operators encode our prior knowledge
on features, and our experiments showed a improve in
the model performance. The idea behind the multichannel
implementation is to use the different information provided
by each channel input in different ways. As each channel
has its own filter maps and weights, it is possible to learn
which features are more important for the final feature set
in each channel. The Sobel operator uses two different 3x3
kernel filters, defined as:
Sx =


−1 0 +1
−2 0 +2


#  Making a Mobile Robot #13 - Using ros2_control on a real robot


    controller_params = os.path.join(
            get_package_share_directory('articubot_one'), # <-- Replace with your package name
            'config',
            'my_controllers.yaml'
            )

---|---
`


Hardware interface plugins can expose a bunch of parameters for us to set. In
this case we’ll have the following:


hwr
i(c−1)mv
(x+h)(y+w)(z+r)
(m−1) )
(3)
where tanh is the hyperbolic tangent function, bcn is the
bias for the nth filter map of the cth layer, m indexes over the
set of feature maps in the (c-1) layer connected to the current
layer c. In the equation, w
hwr
ijm is the weight of the connection
between the unit (h,w,r) within a region, or kernel, connected
to the previous layer (c − 1). Hi and Wi are the height
and width of the kernel and z indexes the image in the
image stack, Ri
is the amount of pictures stacked together
representing the new dimension of the kernel.
To produce invariant features using the cubic kernel, the
image stack is created with different examples of the same
class. This way, the cubic kernel receives a stack of different
motion images, performed with the user in different positions
and distance to the camera.
In the MCCNN implementation each convolutional layer is
followed directly by a max-pooling layer. Each max-pooling
layer compresses the data from the convolutional layer in
smaller images. Each filter map is divided into regions,
and each region is used as input for a unit in the maxpooling layer. This operation enhances invariance to scale
and distortion of the input [10].
To train the model, the MCCNN is attached to a hidden
layer and then connected to a logistic regression classifier.
The result of the classifier is used to calculate the error
for the weights update using the backpropagation algorithm.
This means that all the filters in the channels are updated
individually, but the final error is calculated as a whole.
Using this strategy, the filters in each channel can be trained
to have different roles in the feature extraction but must be
synchronized with the final feature representation.
After the training, the channel receiving the original image
will be mostly responsible for identifying the different pixel
intensities in the image, being able to differentiate between


Parameters file for ackermann_steering_controller is written with reference of
ackermann_steering_controller and steering_controller_library from
ros2_controllers documentation.


Even with all of the ros2_control dependencies installed, the controller
manager seems to not be working. Every form on this same problem seems to be
unsolved for people using the Humble version. Here are the logs and setup
(sorry for the long post):


  * Place a marker on the ground at the robot wheels
  * Restart the controller to reset the robot orientation in RViz
  * Drive the robot one revolution so that the wheels are back where they started


###  Don’t use sim time


###  Odometry accuracy


[ topic_based_ros2_control_plugin_description.xml
](/PickNikRobotics/topic_based_ros2_control/blob/main/topic_based_ros2_control_plugin_description.xml
"topic_based_ros2_control_plugin_description.xml")

|

|

View all files


The first thing we’ll want to do is to put that block we commented out in the
xacro onto a toggle. These steps are very similar to what we did in the [
extra part ](/mobile-robot-12a-ros2-control-extra/) of the previous tutorial:


[ package.xml
](/PickNikRobotics/topic_based_ros2_control/blob/main/package.xml
"package.xml")

|


Skip to content

Toggle navigation

[ ](https://github.com/)

[ Sign in
](/login?return_to=https%3A%2F%2Fgithub.com%2FPickNikRobotics%2Ftopic_based_ros2_control%3Ftab%3Dreadme-
ov-file)

  * Product

    * [ Actions  Automate any workflow  ](/features/actions)
    * [ Packages  Host and manage packages  ](/features/packages)
    * [ Security  Find and fix vulnerabilities  ](/features/security)
    * [ Codespaces  Instant dev environments  ](/features/codespaces)
    * [ Copilot  Write better code with AI  ](/features/copilot)
    * [ Code review  Manage code changes  ](/features/code-review)
    * [ Issues  Plan and track work  ](/features/issues)
    * [ Discussions  Collaborate outside of code  ](/features/discussions)

Explore

    * [ All features ](/features)
    * [ Documentation  ](https://docs.github.com)
    * [ GitHub Skills  ](https://skills.github.com/)
    * [ Blog  ](https://github.blog)

  * Solutions

For

    * [ Enterprise ](/enterprise)
    * [ Teams ](/team)
    * [ Startups ](/enterprise/startups)
    * [ Education  ](https://education.github.com)

By Solution

    * [ CI/CD & Automation ](/solutions/ci-cd/)


[ .clang-tidy ](/PickNikRobotics/topic_based_ros2_control/blob/main/.clang-
tidy ".clang-tidy")

|

|


Your axes in RViz should be aligned the same as they were earlier. If it
isn’t, the encoder counts aren’t being properly converted to angular
measurements. Check that your counts-per-revolution are correct.


PDF
System 800xA Device Management Integrated PROFINET Devices
Summary: No summary available
Data sheet - English - 2023-09-19 - 0,37 MB
PDF
PDF
System 800xA 6.1.1 System Guide Summary
Summary: Summary of the System 800xA 6.1.1 System Guide is now also updated with 6.1.1.1 content.
Brochure - English - 2023-09-15 - 34,89 MB
PDF
PDF
System 800xA 6.1.1.1 Product Catalog
Summary: System 800xA Product Catalog, updated with 6.1.1.1 content and the new Select I/O 1.3 release items.
Catalogue - English - 2023-09-15 - 16,47 MB
PDF
You are not logged in.


and uses a series of deep layers to identify and extract the
features that represent the changes during the gesture execution as this underlies subject variability. The architecture
is divided into two steps: Motion representation and motion
feature extraction. Both steps work together and are part of
the proposed architecture, illustrated in Figure 1.
A. Motion representation
The first layer of the architecture is responsible to create
the motion representation. This layer receives N gray scale
frames, without the application of any preprocessing step,
and creates a representation based on the difference of each
pair of frames. The layer works in a sequential way, receiving
the frames one after the other. After receiving a pair of
Fig. 1: Proposed deep neural architecture used to recognize
dynamic gestures. The first layer receives a number of
frames and generates a motion representation. An MCCNN
implementation is used to learn and extract the features
from the motion representation and use them to classify the
gesture.
frames, this layer computes an absolute difference and sums
up the resulting frame to a stack of frames. This operation
is represented by M:
M =
X
N
i=1
|(Fi−1 − Fi)| W s, (1)
where N is the number of frames, Fi represents the
current frame and W s is the weighted shadow. The absolute
difference of each pair of frames removes irrelevant parts of
the gesture execution, being able to extract the background
or any other detail in the image that is not part of the
gesture motion. By summing up the results it is possible to
create a shape representation of the motion, imprinting it in a
motion representation image. The weighted shadow is used to
create different gray scale shadows in the final representation
according to the time that each frame is presented. The
weighted shadow is defined as W s = i/t, where t is the
memory size. The memory size defines how many frames
will be important in the gesture execution. For example,
a ”Stop” gesture will be faster than a ”Turn Around”


![System architecture](/media/assets/posts/mobile-robot/13-ros2-control-
real/architecture.png)


Copyright © 2023 Articulated Robotics


Now that things are working, let’s unbreak it for Gazebo simulations. At this
point we should push our changes (on the Pi) to git, and pull them back onto
the dev machine.


**Launch file for viewing the car only:**


working on a flexible mechanism for changes in lighting and
additionally extend the system for multi-person scenarios.
In line with the neural architecture proposed so far we are
going to look into unsupervised methods for substituting
the labelling of training data. This will further increase the
autonomous nature of learning, and thus robotic behaviour.
ACKNOWLEDGEMENT
This work was partially supported by CAPES Brazilian
Federal Agency for the Support and Evaluation of Graduate
Education (p.n.5951-13-5), the DAAD German Academic
Exchange Service (Kz:A/13/94748) - CASY Project (Cognitive Assistive Systems), and by the DFG German Research
Foundation (grant #1247) - International Research Training
Group CINACS (Cross-modal Interaction in Natural and
Artificial Cognitive Systems).
REFERENCES
[1] G. Parisi and S. Wermter, “Hierarchical som-based detection of novel
behavior for 3d human tracking,” in Neural Networks (IJCNN), The
2013 International Joint Conference on, Aug 2013, pp. 1–8.
[2] Y. Lecun, L. Bottou, Y. Bengio, and P. Haffner, “Gradient-based
learning applied to document recognition,” in Proceedings of the IEEE,
1998, pp. 2278–2324.
[3] T. Serre, A. Oliva, and T. Poggio, “A feedforward architecture
accounts for rapid categorization,” Proceedings of the National
Academy of Sciences, vol. 104, no. 15, pp. 6424–6429, Apr. 2007.
[Online]. Available: http://dx.doi.org/10.1073/pnas.0700622104
[4] J. Nagi, F. Ducatelle, G. A. Di Caro, D. Ciresan, U. Meier, A. Giusti,
F. Nagi, J. Schmidhuber, and L. M. Gambardella, “Max-pooling convolutional neural networks for vision-based hand gesture recognition,”
in Proc. IEEE Int Signal and Image Processing Applications (ICSIPA)
Conf, 2011, pp. 342–347.
[5] S. Ji, W. Xu, M. Yang, and K. Yu, “3D convolutional neural networks
for human action recognition,” Pattern Analysis and Machine Intelligence, IEEE Transactions on, vol. 35, no. 1, pp. 221–231, Jan 2013.
[6] H. Jhuang, T. Serre, L. Wolf, and T. Poggio, “A
biologically inspired system for action recognition.” in ICCV.
IEEE, 2007, pp. 1–8. [Online]. Available: http://dblp.unitrier.de/db/conf/iccv/iccv2007.htmlJhuangSWP07
[7] J. C. Niebles, H. Wang, and L. Fei-Fei, “Unsupervised learning
of human action categories using spatial-temporal words,” Int. J.
Comput. Vision, vol. 79, no. 3, pp. 299–318, Sept. 2008. [Online].
Available: http://dx.doi.org/10.1007/s11263-007-0122-4
[8] N. Neverova, C. Wolf, G. Paci, G. Sommavilla, G. W. Taylor,
and F. Nebout, “A multi-scale approach to gesture detection and


##  Unbreaking Gazebo


  Search code, repositories, users, issues, pull requests...

Search

Clear

[ Search syntax tips ](https://docs.github.com/search-github/github-code-
search/understanding-github-code-search-syntax)


If that seems to be working then it’s time to take the robot off its stand and
try to drive it around! If you are finding that the wheel speeds are too
fast/slow, the on-screen instructions for ` teleop_twist_keyboard ` show how
to adjust them, however we’ll look at some better approaches to teleop in the
next tutorial.


  Footer navigation

  * [ Terms ](https://docs.github.com/site-policy/github-terms/github-terms-of-service)
  * [ Privacy ](https://docs.github.com/site-policy/privacy-policies/github-privacy-statement)
  * [ Security ](/security)
  * [ Status ](https://www.githubstatus.com/)
  * [ Docs ](https://docs.github.com/)
  * [ Contact ](https://support.github.com?tags=dotcom-footer)
  * Manage cookies
  * Do not share my personal information

You can’t perform that action at this time.


recognition,” in ICCV Workshop on Understanding Human Activities:
Context and Interactions (HACI 2013), Dec. 2013, pp. 484–491.
[Online]. Available: http://liris.cnrs.fr/publis/?id=6330
[9] P. Barros, S. Magg, C. Weber, and S. Wermter, “A multichannel convolutional neural network for hand posture recognition,” in Proceedings
of the 24th international conference on Artificial neural networks - To
apear, ser. ICANN’14, 2014.
[10] D. C. Ciresan, U. Meier, and J. Schmidhuber, “Multi-column deep
neural networks for image classification,” CoRR, vol. abs/1202.2745,
2012.
[11] P. Simard, D. Steinkraus, and J. C. Platt, “Best practices for convolutional neural networks applied to visual document analysis,” in
International Conference on Document Analysis and Recognition, Aug
2003, pp. 958–963.
[12] M. Schwarz, J. Pastrana, M. Schreiber, M. Missura, and S. Behnke,
“Humanoid teensize open platform nimbro-op.”
View publication stats


    # At the top with our imports
    from launch.actions import IncludeLaunchDescription, TimerAction
    ...
    # Directly below the controller manager node
    delayed_controller_manager = TimerAction(period=3.0,actions=[controller_manager])

---|---
`


  Forks

[ **11** forks ](/PickNikRobotics/topic_based_ros2_control/forks)

[ Report repository ](/contact/report-
content?content_url=https%3A%2F%2Fgithub.com%2FPickNikRobotics%2Ftopic_based_ros2_control&report=PickNikRobotics+%28user%29)


Ideally, we want to be able to enable ` use_sim_time ` for the plugin without
having to have it inside the params file. Some ways this could possibly work
are if the plugin always enabled it (since it’s for Gazebo), or had a way to
specify single parameters. Right now though, the only option is to specify
_multiple parameter files_ and it will combine the parameters from all of
them.


    <ros2_control name="ackermann_ros2_control" type="system">
        <hardware>
          <plugin>ackermann_steering_controller/AckermannSteeringController</plugin>
        </hardware>
        <joint name="rear_left_wheel_joint">
            <command_interface name="velocity" />
            <state_interface name="position" />
            <state_interface name="velocity" />
        </joint>
        <joint name="rear_right_wheel_joint">
            <command_interface name="velocity" />
            <state_interface name="position" />
            <state_interface name="velocity" />
        </joint>
        <joint name="left_steering_joint">
            <command_interface name="position" />
            <state_interface name="position" />
            <state_interface name="velocity" />
        </joint>
        <joint name="right_steering_joint">
            <command_interface name="position" />
            <state_interface name="position" />
            <state_interface name="velocity" />
        </joint>
    </ros2_control>


  * Our launch file ` launch_robot.launch.py ` , where we include the robot state publisher launch ( ` rsp.launch.py ` )
  * Our parameters file ` my_controller_params.yaml ` (in this case, just remove the line rather than explicitly setting it to false)


    1
    2
    3
    4
    5


[ External Requests  ](/c/external-requests/50)


So we can create a new params file (e.g. ` config/gaz_ros2_ctl_sim.yaml ` )
containing only:


![Encoder test](/media/assets/posts/mobile-robot/13-ros2-control-
real/encoders.png)


Ok, that _should_ be all we need. Let’s rerun colcon to add the new launch
file, and then we can test it!


  Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel  Submit feedback


##  Testing it out!


I have been working on making a real hardware robot(car) with ackermann
steering with front steering and rear wheels for driving. I have managed to
load my car on rviz2. I used ros2_controllers/ackermann_steering_controller
package for ros2_control for driving the car.


Now, whenever we are simulating, the Gazebo version should be enabled, and
when we are running the live system the other one will be. Of course there are
many ` <gazebo> ` tags throughout our URDF that we _could_ disable when not in
sim mode, but they will not be evaluated anyway so it doesn’t really matter.


  Watchers

[ **5** watching ](/PickNikRobotics/topic_based_ros2_control/watchers)


**THIS IS THE ERORR!!!**


![Articulated Robotics](/assets/images/logo2.png)


    * [ DevOps ](/solutions/devops/)
    * [ DevSecOps  ](https://resources.github.com/devops/fundamentals/devsecops/)

Resources

    * [ Learning Pathways  ](https://resources.github.com/learn/pathways/)
    * [ White papers, Ebooks, Webinars  ](https://resources.github.com/)
    * [ Customer Stories ](/customer-stories)
    * [ Partners  ](https://partner.github.com/)

  * Open Source

    * [ GitHub Sponsors  Fund open source developers  ](/sponsors)

    * [ The ReadME Project  GitHub community articles  ](/readme)

Repositories

    * [ Topics ](/topics)
    * [ Trending ](/trending)
    * [ Collections ](/collections)

  * [ Pricing ](/pricing)

Search or jump to...


You’ll need to set the parameters appropriately for your system. The result
should look something like:


[ Josh Newans ](https://articulatedrobotics.xyz/) [ Follow
](https://www.facebook.com/ArticulatedRobotics/)
Creator of Articulated Robotics.


We can also then delay the controller spawners until the controller manager
has started. They do have a decent timeout anyway and so will probably be
fine, but chaining it together like this is a bit neater.


    1
    2
    3
    4
    5
    6


Now we want to see how accurate our odometry is. Odometry will never be
perfect, which is why we use other localisation methods such as SLAM or GPS,
but it is still worth getting as good as we can. There are three easy steps we
can take to assess this (ensure they are done in order as each step is
affected by the previous).


  Languages

  * [ C++  90.5%  ](/PickNikRobotics/topic_based_ros2_control/search?l=c%2B%2B)
  * [ CMake  9.5%  ](/PickNikRobotics/topic_based_ros2_control/search?l=cmake)


So on the real robot it’ll just read the main params file, and on Gazebo it’ll
do both, and so have sim time enabled.


Now we can drive our robot around which is a huge step forward, and hopefully
it’s starting to feel like a real robot. In the [ next tutorial ](/mobile-
robot-14a-teleop/) we’ll look deeper at _teleoperation_ (remote control),
including how to control our robot using a game controller, or a smartphone.


###  Delaying our nodes


[ .github/  workflows
](/PickNikRobotics/topic_based_ros2_control/tree/main/.github/workflows "This
path skips through empty directories")

|

|


Latest commit


  About

ros2_control hardware interface that uses topics to command the robot and
publish its state