File tree Expand file tree Collapse file tree 5 files changed +8
-0
lines changed
rcs_panda/src/rcs_panda/_core/hw Expand file tree Collapse file tree 5 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,9 @@ common::Pose Franka::get_cartesian_position() {
110110 x = common::Pose (this ->curr_state .O_T_EE );
111111 this ->interpolator_mutex .unlock ();
112112 }
113+ if (!this ->cfg .tcp_offset_configured_in_desk ) {
114+ return x * cfg.tcp_offset ;
115+ }
113116 return x;
114117}
115118
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ struct FrankaConfig : common::RobotConfig {
4343 std::optional<common::Pose> nominal_end_effector_frame = std::nullopt ;
4444 std::optional<common::Pose> world_to_robot = std::nullopt ;
4545 bool async_control = false ;
46+ bool tcp_offset_configured_in_desk = true ;
4647};
4748
4849struct FR3Config : FrankaConfig {};
Original file line number Diff line number Diff line change @@ -133,6 +133,8 @@ PYBIND11_MODULE(_core, m) {
133133 .def_readwrite (" nominal_end_effector_frame" ,
134134 &rcs::hw::FrankaConfig::nominal_end_effector_frame)
135135 .def_readwrite (" world_to_robot" , &rcs::hw::FrankaConfig::world_to_robot)
136+ .def_readwrite (" tcp_offset_configured_in_desk" ,
137+ &rcs::hw::FrankaConfig::tcp_offset_configured_in_desk)
136138 .def_readwrite (" async_control" , &rcs::hw::FrankaConfig::async_control);
137139
138140 py::class_<rcs::hw::FR3Config, rcs::hw::FrankaConfig>(hw, " FR3Config" )
Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ class FrankaConfig(rcs._core.common.RobotConfig):
100100 load_parameters : FrankaLoad | None
101101 nominal_end_effector_frame : rcs ._core .common .Pose | None
102102 speed_factor : float
103+ tcp_offset_configured_in_desk : bool
103104 world_to_robot : rcs ._core .common .Pose | None
104105 def __init__ (self ) -> None : ...
105106
Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ class FrankaConfig(rcs._core.common.RobotConfig):
100100 load_parameters : FrankaLoad | None
101101 nominal_end_effector_frame : rcs ._core .common .Pose | None
102102 speed_factor : float
103+ tcp_offset_configured_in_desk : bool
103104 world_to_robot : rcs ._core .common .Pose | None
104105 def __init__ (self ) -> None : ...
105106
You can’t perform that action at this time.
0 commit comments