Skip to content

resource loaning#224

Merged
Karsten1987 merged 19 commits intomasterfrom
resource_loaning
Nov 11, 2020
Merged

resource loaning#224
Karsten1987 merged 19 commits intomasterfrom
resource_loaning

Conversation

@Karsten1987
Copy link
Copy Markdown
Contributor

@Karsten1987 Karsten1987 commented Nov 4, 2020

Part four of #164

currently sits on top of #207

Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>
Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>
Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>
Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>
Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>
Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>
Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>
Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>
Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>
Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>
Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>
Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>
Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>
Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>
@Karsten1987 Karsten1987 marked this pull request as draft November 4, 2020 03:31
Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>
@Karsten1987 Karsten1987 marked this pull request as ready for review November 4, 2020 20:36
Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>
@Karsten1987
Copy link
Copy Markdown
Contributor Author

I've added a set of function overloads in 7ac53d5 which lets the user add hardware components which are not declared in the URDF.
This is mainly with respect to the gazebo_ros2_control packages, which I believe create a hardware components dynamically based on the original URDF (not the ros2_control tags). There's no straightforward way for me to figure out how a gazebo plugin can be loaded twice, once as a hardware component as well as a gazebo plugin to use gazebo API.

Base automatically changed from allocate_components to master November 5, 2020 17:33
* move resource manager to hardware interface

Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>

* include functional for std::function

Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>
@Karsten1987
Copy link
Copy Markdown
Contributor Author

I hope to have addressed all review comments @bmagyar

@bmagyar bmagyar requested a review from destogl November 10, 2020 07:02
@Karsten1987 Karsten1987 merged commit 993db54 into master Nov 11, 2020
@Karsten1987 Karsten1987 deleted the resource_loaning branch November 11, 2020 05:08
@Karsten1987
Copy link
Copy Markdown
Contributor Author

@destogl please go ahead and open follow-up tickets or continue to comment on this PR in case you have outstanding comments.

@destogl
Copy link
Copy Markdown
Member

destogl commented Nov 13, 2020

I don't have major comments, just need a few clarifications. For example, I am missing unclaiming of the command_interfaces.

@Karsten1987
Copy link
Copy Markdown
Contributor Author

The "unclaiming" happens implicit in the destructor of the LoanedCommandInterface, here:

void ResourceManager::release_command_interface(const std::string & key)
{
std::lock_guard<decltype(resource_lock_)> lg(resource_lock_);
claimed_command_interface_map_[key] = false;
}

The destructor has a support for a custom callback upon destruction, which is set here:

return LoanedCommandInterface(
resource_storage_->command_interface_map_.at(key),
std::bind(&ResourceManager::release_command_interface, this, key));

destogl pushed a commit to b-robotized-forks/ros2_control that referenced this pull request Aug 11, 2022
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.

3 participants