-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #175 in SWDEV/franka_ros from SRR-1142-review-gaze…
…bo-motion-generators to develop * commit '68968a9fc617ae442ac2fbb210cb0385a83ba829': (22 commits) update CHANGELOG.md fix desired robot states refactor doSwitch for loops move controller verification into a separate class add implement prepareSwitch to avoid starting malformed controllers only allow revolute joints for position control remove joint_names_arm refactor claimsInterface reliably launch joint_{position,velocity}_example_controller on startup in gazebo. adapt the output of the desired robot states to match the behavior of the real robot rename efforts_initialized_ to robot_initialized_ improve pid initialization refactor doSwitch method add joint_{position,velocity}_example_controller to franka_gazebo add possibility to switch between control methods at runtime add all transmission types to panda_arm.urdf.xacro feat: add effort and position traj controllers to simulation feat: add position and velocity motion generators to FrankaHWSim fix: fix conflict with #181 Expose transmission argument in franka_gazebo/panda.launch ...
- Loading branch information
Showing
14 changed files
with
751 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#pragma once | ||
#include <franka_gazebo/joint.h> | ||
#include <hardware_interface/controller_info.h> | ||
#include <hardware_interface/interface_resources.h> | ||
#include <hardware_interface/internal/hardware_resource_manager.h> | ||
#include <boost/optional.hpp> | ||
|
||
namespace franka_gazebo { | ||
|
||
/// Can be used to check controllers in franka_gazebo. It also can distinguish | ||
/// between gripper and arm controllers. | ||
class ControllerVerifier { | ||
public: | ||
/// Creates a ControllerVerifier object to check controllers for franka_gazebo | ||
/// @param joints map of joint names and joints including gripper joints | ||
/// @param arm_id prefix of the joints | ||
ControllerVerifier(const std::map<std::string, std::shared_ptr<franka_gazebo::Joint>>& joints, | ||
const std::string& arm_id); | ||
|
||
/// checks if a set of joint_names only contains the joints that are used for the arm | ||
bool areArmJoints(const std::set<std::string>& resources) const; | ||
|
||
/// checks if a controller can be used in the franka_hw gazebo plugin | ||
bool isValidController(const hardware_interface::ControllerInfo& controller) const; | ||
|
||
/// checks if a set of joint_names only contains the joints that are used for the gripper | ||
bool areFingerJoints(const std::set<std::string>& resources) const; | ||
|
||
/// checks if a controller wants to use the finger joints with the effort interface | ||
bool isClaimingGripperController(const hardware_interface::ControllerInfo& info) const; | ||
|
||
/// checks if a controller that uses the joints of the arm (not gripper joints) claims a position, | ||
/// velocity or effort interface. | ||
bool isClaimingArmController(const hardware_interface::ControllerInfo& info) const; | ||
|
||
/// returns the control method of a hardware interface | ||
static boost::optional<ControlMethod> determineControlMethod( | ||
const std::string& hardware_interface); | ||
|
||
private: | ||
std::vector<std::string> joint_names_; | ||
std::string arm_id_; | ||
|
||
static bool hasControlMethodAndValidSize(const hardware_interface::InterfaceResources& resource); | ||
}; | ||
} // namespace franka_gazebo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
@marcbone Maybe move this above the
effort_joint_trajectory_controller
to keep it consistent with the order in default_controllers.yaml. Not important but just something I noticed.franka_ros/franka_control/config/default_controllers.yaml
Lines 1 to 47 in 30dc6b8