Classes | Functions | Variables
franka_combinable_hw_controller_switching_test.cpp File Reference
#include <array>
#include <list>
#include <memory>
#include <random>
#include <set>
#include <string>
#include <gtest/gtest.h>
#include <hardware_interface/controller_info.h>
#include <hardware_interface/joint_command_interface.h>
#include <joint_limits_interface/joint_limits.h>
#include <joint_limits_interface/joint_limits_urdf.h>
#include <ros/ros.h>
#include <urdf/model.h>
#include <franka_hw/franka_cartesian_command_interface.h>
#include <franka_hw/franka_combinable_hw.h>
Include dependency graph for franka_combinable_hw_controller_switching_test.cpp:

Go to the source code of this file.

Classes

class  CombinableControllerConflict
 
class  CombinableNoControllerConflict
 

Functions

std::string arm_id2 ("panda2")
 
std::string cp_iface_str ("franka_hw::FrankaPoseCartesianInterface")
 
std::string cv_iface_str ("franka_hw::FrankaVelocityCartesianInterface")
 
 INSTANTIATE_TEST_CASE_P (combinableNonAdmissibleRequests, CombinableControllerConflict,::testing::Values(std::list< hardware_interface::ControllerInfo >{no_id_info}, std::list< hardware_interface::ControllerInfo >{unknown_iface_info}, std::list< hardware_interface::ControllerInfo >{jp_info}, std::list< hardware_interface::ControllerInfo >{jv_info}, std::list< hardware_interface::ControllerInfo >{cv_info}, std::list< hardware_interface::ControllerInfo >{cp_info}, std::list< hardware_interface::ControllerInfo >{jt_jp_info}, std::list< hardware_interface::ControllerInfo >{jt_jv_info}, std::list< hardware_interface::ControllerInfo >{jt_jt_info}, std::list< hardware_interface::ControllerInfo >{jp_jp_info}, std::list< hardware_interface::ControllerInfo >{jp_jv_info}, std::list< hardware_interface::ControllerInfo >{jp_cv_info}, std::list< hardware_interface::ControllerInfo >{jp_cp_info}, std::list< hardware_interface::ControllerInfo >{jv_jv_info}, std::list< hardware_interface::ControllerInfo >{jv_cv_info}, std::list< hardware_interface::ControllerInfo >{jv_cp_info}, std::list< hardware_interface::ControllerInfo >{cv_cv_info}, std::list< hardware_interface::ControllerInfo >{cv_cp_info}, std::list< hardware_interface::ControllerInfo >{cp_cp_info}, std::list< hardware_interface::ControllerInfo >{jp_jp_jp_info}, std::list< hardware_interface::ControllerInfo >{jt_cv_info}, std::list< hardware_interface::ControllerInfo >{jt_cp_info}))
 
 INSTANTIATE_TEST_CASE_P (combinableAdmissibleRequests, CombinableNoControllerConflict,::testing::Values(std::list< hardware_interface::ControllerInfo >{jt_info}, std::list< hardware_interface::ControllerInfo >{jt_info, cp_arm2_info}))
 
std::string jp_iface_str ("hardware_interface::PositionJointInterface")
 
std::string jt_iface_str ("hardware_interface::EffortJointInterface")
 
std::string jv_iface_str ("hardware_interface::VelocityJointInterface")
 
std::string name_str ("some_controller")
 
hardware_interface::ControllerInfo newInfo (const std::string &name, const std::string &type, const hardware_interface::InterfaceResources &resource1)
 
hardware_interface::ControllerInfo newInfo (const std::string &name, const std::string &type, const hardware_interface::InterfaceResources &resource1, const hardware_interface::InterfaceResources &resource2)
 
hardware_interface::ControllerInfo newInfo (const std::string &name, const std::string &type, const hardware_interface::InterfaceResources &resource1, const hardware_interface::InterfaceResources &resource2, const hardware_interface::InterfaceResources &resource3)
 
 TEST (FrankaCombinableHWTests, CanInitROSInterfaces)
 
 TEST_P (CombinableControllerConflict, ConflictsForIncompatibleControllers)
 
 TEST_P (CombinableNoControllerConflict, DoesNotConflictForCompatibleControllers)
 
 TEST_P (CombinableNoControllerConflict, CanPrepareSwitchForCompatibleControllers)
 
std::string type_str ("SomeControllerClass")
 
std::string unknown_iface_str ("hardware_interface::UnknownInterface")
 

Variables

std::string arm_id
 
std::set< std::string > cartesian_arm2_set = {arm_id2 + "_robot"}
 
std::set< std::string > cartesian_set = {arm_id + "_robot"}
 
hardware_interface::ControllerInfo cp_arm2_info = newInfo(name_str, type_str, cp_arm2_res)
 
hardware_interface::InterfaceResources cp_arm2_res (cp_iface_str, cartesian_arm2_set)
 
hardware_interface::ControllerInfo cp_cp_info = newInfo(name_str, type_str, cp_res, cp_res)
 
hardware_interface::ControllerInfo cp_info = newInfo(name_str, type_str, cp_res)
 
hardware_interface::InterfaceResources cp_res (cp_iface_str, cartesian_set)
 
hardware_interface::ControllerInfo cv_cp_info = newInfo(name_str, type_str, cv_res, cp_res)
 
hardware_interface::ControllerInfo cv_cv_info = newInfo(name_str, type_str, cv_res, cv_res)
 
hardware_interface::ControllerInfo cv_info = newInfo(name_str, type_str, cv_res)
 
hardware_interface::InterfaceResources cv_res (cv_iface_str, cartesian_set)
 
std::array< std::string, 7 > joint_names
 
std::set< std::string > joints_set
 
hardware_interface::ControllerInfo jp_cp_info = newInfo(name_str, type_str, jp_res, cp_res)
 
hardware_interface::ControllerInfo jp_cv_info = newInfo(name_str, type_str, jp_res, cv_res)
 
hardware_interface::ControllerInfo jp_info = newInfo(name_str, type_str, jp_res)
 
hardware_interface::ControllerInfo jp_jp_info = newInfo(name_str, type_str, jp_res, jp_res)
 
hardware_interface::ControllerInfo jp_jp_jp_info
 
hardware_interface::ControllerInfo jp_jv_info = newInfo(name_str, type_str, jp_res, jv_res)
 
hardware_interface::InterfaceResources jp_res (jp_iface_str, joints_set)
 
hardware_interface::ControllerInfo jt_cp_info = newInfo(name_str, type_str, jt_res, cp_res)
 
hardware_interface::ControllerInfo jt_cv_info = newInfo(name_str, type_str, jt_res, cv_res)
 
hardware_interface::ControllerInfo jt_info = newInfo(name_str, type_str, jt_res)
 
hardware_interface::ControllerInfo jt_jp_info = newInfo(name_str, type_str, jt_res, jp_res)
 
hardware_interface::ControllerInfo jt_jt_info = newInfo(name_str, type_str, jt_res, jt_res)
 
hardware_interface::ControllerInfo jt_jv_info = newInfo(name_str, type_str, jt_res, jv_res)
 
hardware_interface::InterfaceResources jt_res (jt_iface_str, joints_set)
 
hardware_interface::ControllerInfo jv_cp_info = newInfo(name_str, type_str, jv_res, cp_res)
 
hardware_interface::ControllerInfo jv_cv_info = newInfo(name_str, type_str, jv_res, cv_res)
 
hardware_interface::ControllerInfo jv_info = newInfo(name_str, type_str, jv_res)
 
hardware_interface::ControllerInfo jv_jv_info = newInfo(name_str, type_str, jv_res, jv_res)
 
hardware_interface::InterfaceResources jv_res (jv_iface_str, joints_set)
 
hardware_interface::ControllerInfo no_id_info = newInfo(name_str, type_str, no_id_res)
 
hardware_interface::InterfaceResources no_id_res (jp_iface_str, no_id_set)
 
std::set< std::string > no_id_set = {"joint1"}
 
hardware_interface::ControllerInfo unknown_iface_info
 
hardware_interface::InterfaceResources unknown_iface_res (unknown_iface_str, joints_set)
 

Function Documentation

std::string arm_id2 ( "panda2"  )
std::string cp_iface_str ( "franka_hw::FrankaPoseCartesianInterface"  )
std::string cv_iface_str ( "franka_hw::FrankaVelocityCartesianInterface"  )
INSTANTIATE_TEST_CASE_P ( combinableAdmissibleRequests  ,
CombinableNoControllerConflict  ,
::testing::Values(std::list< hardware_interface::ControllerInfo >{jt_info}, std::list< hardware_interface::ControllerInfo >{jt_info, cp_arm2_info})   
)
std::string jp_iface_str ( "hardware_interface::PositionJointInterface"  )
std::string jt_iface_str ( "hardware_interface::EffortJointInterface"  )
std::string jv_iface_str ( "hardware_interface::VelocityJointInterface"  )
std::string name_str ( "some_controller"  )
hardware_interface::ControllerInfo newInfo ( const std::string &  name,
const std::string &  type,
const hardware_interface::InterfaceResources resource1 
)
hardware_interface::ControllerInfo newInfo ( const std::string &  name,
const std::string &  type,
const hardware_interface::InterfaceResources resource1,
const hardware_interface::InterfaceResources resource2 
)
hardware_interface::ControllerInfo newInfo ( const std::string &  name,
const std::string &  type,
const hardware_interface::InterfaceResources resource1,
const hardware_interface::InterfaceResources resource2,
const hardware_interface::InterfaceResources resource3 
)
TEST ( FrankaCombinableHWTests  ,
CanInitROSInterfaces   
)
TEST_P ( CombinableControllerConflict  ,
ConflictsForIncompatibleControllers   
)
TEST_P ( CombinableNoControllerConflict  ,
DoesNotConflictForCompatibleControllers   
)
TEST_P ( CombinableNoControllerConflict  ,
CanPrepareSwitchForCompatibleControllers   
)
std::string type_str ( "SomeControllerClass"  )
std::string unknown_iface_str ( "hardware_interface::UnknownInterface"  )

Variable Documentation

std::string arm_id
std::set<std::string> cartesian_arm2_set = {arm_id2 + "_robot"}
std::set<std::string> cartesian_set = {arm_id + "_robot"}
std::array<std::string, 7> joint_names

Definition at line 27 of file franka_hw_controller_switching_test.cpp.

std::set<std::string> joints_set
Initial value:
= {joint_names[0], joint_names[1], joint_names[2], joint_names[3],
joint_names[4], joint_names[5], joint_names[6]}
std::array< std::string, 7 > joint_names

Definition at line 108 of file franka_combinable_hw_controller_switching_test.cpp.

Initial value:
=
std::string name_str("some_controller")
hardware_interface::InterfaceResources jp_res(jp_iface_str, joints_set)
hardware_interface::ControllerInfo newInfo(const std::string &name, const std::string &type, const hardware_interface::InterfaceResources &resource1)
std::string type_str("SomeControllerClass")

Definition at line 136 of file franka_combinable_hw_controller_switching_test.cpp.

std::set<std::string> no_id_set = {"joint1"}
Initial value:
=
std::string name_str("some_controller")
hardware_interface::ControllerInfo newInfo(const std::string &name, const std::string &type, const hardware_interface::InterfaceResources &resource1)
hardware_interface::InterfaceResources unknown_iface_res(unknown_iface_str, joints_set)
std::string type_str("SomeControllerClass")

Definition at line 123 of file franka_combinable_hw_controller_switching_test.cpp.



franka_hw
Author(s): Franka Emika GmbH
autogenerated on Fri Oct 23 2020 03:47:05