Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Added logic for hardware interfaces #139

Merged
merged 1 commit into from Jun 24, 2022

Conversation

ahcorde
Copy link
Collaborator

@ahcorde ahcorde commented Jun 20, 2022

Signed-off-by: ahcorde ahcorde@gmail.com

It might be related with this issues ros-controls/gz_ros2_control#62

hardware interfaces now have state logic around them, so they need to be set in the active state. I tried the command added in the issue

ros2 service call controller_manager/set_hardware_component_state controller_manager_msgs/srv/SetHardwareComponentState '{name: 'GazeboSimSystem', target_state: {id: 3, label: ""}}'

and it works but these few lines have the same effect

Signed-off-by: ahcorde <ahcorde@gmail.com>
@ahcorde ahcorde requested review from destogl and bmagyar June 20, 2022 12:04
@ahcorde ahcorde self-assigned this Jun 20, 2022
Copy link
Member

@destogl destogl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good for now. Maybe at some point we have to add also hardware lifecycle in the simulation.

@destogl destogl merged commit 979e742 into master Jun 24, 2022
@destogl destogl deleted the ahcorde/master/logic_hardware_interfaces branch June 24, 2022 15:09
ahcorde added a commit to ahcorde/rosdistro that referenced this pull request Jul 5, 2022
Increasing version of package(s) in repository `gazebo_ros2_control` to `0.3.1-1`:

- upstream repository: https://github.com/ros-simulation/gazebo_ros2_control.git
- release repository: https://github.com/ros2-gbp/gazebo_ros2_control-release.git
- distro file: `rolling/distribution.yaml`
- bloom version: `0.11.1`
- previous version for package: `0.3.0-1`

```
* Added logic for activating hardware interfaces (ros#139 <ros-controls/gazebo_ros2_control#139>)
* Adjust repo URL (ros#134 <ros-controls/gazebo_ros2_control#134>)
* Contributors: Alejandro Hernández Cordero, Bence Magyar
```

```
* Fixed CMake source file extension (ros#140 <ros-controls/gazebo_ros2_control#140>)
* Adding simulation time parameter for the controller manager (ros#138 <ros-controls/gazebo_ros2_control#138>)
  Adding the simulation parameter so that the controller manager uses the simulation time instead of the ROS time.  The '/odom' and corresponding tf will only be published if this parameter is set to true.
* Adjust repo URL (ros#134 <ros-controls/gazebo_ros2_control#134>)
* Changed launch variable name (ros#130 <ros-controls/gazebo_ros2_control#130>)
* Contributors: Alejandro Hernández Cordero, Bence Magyar, Eslam Salah, Jakub "Deli" Delicat
```

Signed-off-by: ahcorde <ahcorde@gmail.com>
tfoote pushed a commit to ros/rosdistro that referenced this pull request Jul 7, 2022
…33784)

Increasing version of package(s) in repository `gazebo_ros2_control` to `0.3.1-1`:

- upstream repository: https://github.com/ros-simulation/gazebo_ros2_control.git
- release repository: https://github.com/ros2-gbp/gazebo_ros2_control-release.git
- distro file: `rolling/distribution.yaml`
- bloom version: `0.11.1`
- previous version for package: `0.3.0-1`

```
* Added logic for activating hardware interfaces (#139 <ros-controls/gazebo_ros2_control#139>)
* Adjust repo URL (#134 <ros-controls/gazebo_ros2_control#134>)
* Contributors: Alejandro Hernández Cordero, Bence Magyar
```

```
* Fixed CMake source file extension (#140 <ros-controls/gazebo_ros2_control#140>)
* Adding simulation time parameter for the controller manager (#138 <ros-controls/gazebo_ros2_control#138>)
  Adding the simulation parameter so that the controller manager uses the simulation time instead of the ROS time.  The '/odom' and corresponding tf will only be published if this parameter is set to true.
* Adjust repo URL (#134 <ros-controls/gazebo_ros2_control#134>)
* Changed launch variable name (#130 <ros-controls/gazebo_ros2_control#130>)
* Contributors: Alejandro Hernández Cordero, Bence Magyar, Eslam Salah, Jakub "Deli" Delicat
```

Signed-off-by: ahcorde <ahcorde@gmail.com>
rclcpp_lifecycle::State state(
lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE,
hardware_interface::lifecycle_state_names::ACTIVE);
resource_manager_->set_component_state("GazeboSimSystem", state);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it supposed to be "GazeboSystem"? That's the name used in the demos

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just saw that @samiamlabs commented the same

ahcorde added a commit that referenced this pull request Aug 15, 2022
Signed-off-by: ahcorde <ahcorde@gmail.com>
destogl pushed a commit that referenced this pull request Aug 17, 2022
* Implemented perform_command_mode_switch override in GazeboSystem (#136)
* added namespace to controller manager (#147)
* Added logic for activating hardware interfaces (#139)

Signed-off-by: ahcorde <ahcorde@gmail.com>
Co-authored-by: Keegan Sotebeer <ksotebeer95@gmail.com>
Co-authored-by: Maciej Bednarczyk <83034299+mcbed@users.noreply.github.com>
Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
ahcorde added a commit that referenced this pull request Nov 21, 2022
* fix maintainer email (#92)

Signed-off-by: ahcorde <ahcorde@gmail.com>

* CHANGELOG

Signed-off-by: ahcorde <ahcorde@gmail.com>

* 0.0.4

* 0.0.5

* Update Foxy dockerfile (#101)

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Declare dependency of gazebo_hardware_plugins to urdf in CMakeLists.txt (#117) (#119)

Co-authored-by: Martin Wudenka <Martin.Wudenka@gmx.de>

* Added diff drive example (#113)

Signed-off-by: ahcorde <ahcorde@gmail.com>

* changelog

Signed-off-by: ahcorde <ahcorde@gmail.com>

* 0.1.0

* [backport Foxy] #136 #147 #139 #134 (#150)

* Implemented perform_command_mode_switch override in GazeboSystem (#136)
* added namespace to controller manager (#147)
* Added logic for activating hardware interfaces (#139)

Signed-off-by: ahcorde <ahcorde@gmail.com>
Co-authored-by: Keegan Sotebeer <ksotebeer95@gmail.com>
Co-authored-by: Maciej Bednarczyk <83034299+mcbed@users.noreply.github.com>
Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>

* [Backport Foxy] Support for mimic joints and example with gripper. (#121)

* [Backport Foxy] Support for mimic joints and example with gripper.

* Enable loading params from multiple yaml files (#149) (#151)

Co-authored-by: Tony Najjar <tony.najjar@logivations.com>

* Adding simulation time parameter for the controller manager (#138) (#158)

Co-authored-by: Eslam Salah <eslamsalahelsheikh@gmail.com>

* Changelog

Signed-off-by: ahcorde <ahcorde@gmail.com>

* 0.1.1

* Add pre-commit hooks configuration (#161)

* Add pre-commit hooks configuration

Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>

* Pre-commit in a separate action

Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>

* Fix codespell

Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>

Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>

Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Co-authored-by: Martin Wudenka <Martin.Wudenka@gmx.de>
Co-authored-by: Keegan Sotebeer <ksotebeer95@gmail.com>
Co-authored-by: Maciej Bednarczyk <83034299+mcbed@users.noreply.github.com>
Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
Co-authored-by: Leander Stephen D'Souza <leanderdsouza1234@gmail.com>
Co-authored-by: Tony Najjar <tony.najjar@logivations.com>
Co-authored-by: Eslam Salah <eslamsalahelsheikh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants