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 (combinableAdmissibleRequests, CombinableNoControllerConflict, ::testing::Values(std::list< hardware_interface::ControllerInfo >{jt_info}, std::list< hardware_interface::ControllerInfo >{ jt_info, cp_arm2_info}))
 
 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}))
 
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, CanPrepareSwitchForCompatibleControllers)
 
 TEST_P (CombinableNoControllerConflict, DoesNotConflictForCompatibleControllers)
 
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

◆ arm_id2()

std::string arm_id2 ( "panda2"  )

◆ cp_iface_str()

std::string cp_iface_str ( "franka_hw::FrankaPoseCartesianInterface"  )

◆ cv_iface_str()

std::string cv_iface_str ( "franka_hw::FrankaVelocityCartesianInterface"  )

◆ INSTANTIATE_TEST_CASE_P() [1/2]

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})   
)

◆ INSTANTIATE_TEST_CASE_P() [2/2]

◆ jp_iface_str()

std::string jp_iface_str ( "hardware_interface::PositionJointInterface"  )

◆ jt_iface_str()

std::string jt_iface_str ( "hardware_interface::EffortJointInterface"  )

◆ jv_iface_str()

std::string jv_iface_str ( "hardware_interface::VelocityJointInterface"  )

◆ name_str()

std::string name_str ( "some_controller"  )

◆ newInfo() [1/3]

hardware_interface::ControllerInfo newInfo ( const std::string &  name,
const std::string &  type,
const hardware_interface::InterfaceResources resource1 
)

◆ newInfo() [2/3]

hardware_interface::ControllerInfo newInfo ( const std::string &  name,
const std::string &  type,
const hardware_interface::InterfaceResources resource1,
const hardware_interface::InterfaceResources resource2 
)

◆ newInfo() [3/3]

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

TEST ( FrankaCombinableHWTests  ,
CanInitROSInterfaces   
)

◆ TEST_P() [1/3]

TEST_P ( CombinableControllerConflict  ,
ConflictsForIncompatibleControllers   
)

◆ TEST_P() [2/3]

TEST_P ( CombinableNoControllerConflict  ,
CanPrepareSwitchForCompatibleControllers   
)

◆ TEST_P() [3/3]

TEST_P ( CombinableNoControllerConflict  ,
DoesNotConflictForCompatibleControllers   
)

◆ type_str()

std::string type_str ( "SomeControllerClass"  )

◆ unknown_iface_str()

std::string unknown_iface_str ( "hardware_interface::UnknownInterface"  )

Variable Documentation

◆ arm_id

std::string arm_id

◆ cartesian_arm2_set

std::set<std::string> cartesian_arm2_set = {arm_id2 + "_robot"}

◆ cartesian_set

std::set<std::string> cartesian_set = {arm_id + "_robot"}

◆ cp_arm2_info

◆ cp_arm2_res

◆ cp_cp_info

◆ cp_info

◆ cp_res

◆ cv_cp_info

◆ cv_cv_info

◆ cv_info

◆ cv_res

◆ joint_names

std::array<std::string, 7> joint_names

Definition at line 27 of file franka_hw_controller_switching_test.cpp.

◆ joints_set

std::set<std::string> joints_set

◆ jp_cp_info

◆ jp_cv_info

◆ jp_info

◆ jp_jp_info

◆ jp_jp_jp_info

◆ jp_jv_info

◆ jp_res

◆ jt_cp_info

◆ jt_cv_info

◆ jt_info

◆ jt_jp_info

◆ jt_jt_info

◆ jt_jv_info

◆ jt_res

◆ jv_cp_info

◆ jv_cv_info

◆ jv_info

◆ jv_jv_info

◆ jv_res

◆ no_id_info

◆ no_id_res

◆ no_id_set

std::set<std::string> no_id_set = {"joint1"}

◆ unknown_iface_info

◆ unknown_iface_res

jp_res
hardware_interface::InterfaceResources jp_res(jp_iface_str, joints_set)
name_str
std::string name_str("some_controller")
type_str
std::string type_str("SomeControllerClass")
unknown_iface_res
hardware_interface::InterfaceResources unknown_iface_res(unknown_iface_str, joints_set)
joint_names
std::array< std::string, 7 > joint_names
Definition: franka_hw_controller_switching_test.cpp:27
newInfo
hardware_interface::ControllerInfo newInfo(const std::string &name, const std::string &type, const hardware_interface::InterfaceResources &resource1)
Definition: franka_combinable_hw_controller_switching_test.cpp:24


franka_hw
Author(s): Franka Emika GmbH
autogenerated on Mon Sep 19 2022 02:33:21