diff --git a/cobot-setting.yaml b/cobot-setting.yaml
index 8133957..1b569f8 100644
--- a/cobot-setting.yaml
+++ b/cobot-setting.yaml
@@ -2,7 +2,6 @@ robot:
name: "iiwa7"
ip: "192.170.10.2"
port: 30200
- command_mode: "position" # torque, position
fri_cycle_ms: 10 # период FRI-цикла: 5 мс (200 Гц) или 10 мс (100 Гц)
joint_position_tau: 0.04 # EMA фильтр позиций [с]: сглаживает команды перед отправкой в FRI
joint_velocity_tau: 0.01 # EMA фильтр скорости [с]: убирает выбросы конечных разностей
@@ -19,7 +18,7 @@ digital_twin:
controller_timer: "50"
cameras:
- - pkg://iiwa_config/config/cameras/d455_top.yaml
+ - pkg://iiwa_config/config/cameras/d455_top.yaml
rviz:
config: pkg://iiwa_config/config/rviz/rviz_moveit.rviz
@@ -62,12 +61,12 @@ foxglove:
send_buffer_limit: 10000000 # Максимальный размер буфера отправки в байтах (защита от OOM при медленном клиенте)
use_sim_time: false # Использовать симуляционное время /clock вместо системного
capabilities: # Список возможностей, открытых клиенту
- - clientPublish
- - parameters
- - parametersSubscribe
- - services
- - connectionGraph
- - assets
+ - clientPublish
+ - parameters
+ - parametersSubscribe
+ - services
+ - connectionGraph
+ - assets
include_hidden: false # Показывать клиенту скрытые топики и сервисы (начинаются с _)
asset_uri_allowlist: ['^package://(?:[-\w%]+/)*[-\w%.]+\.(?:dae|fbx|glb|gltf|jpeg|jpg|mtl|obj|png|stl|tif|tiff|urdf|webp|xacro)$'] # Regex-список URI вида package://..., из которых bridge разрешает отдавать файлы-ассеты (URDF, mesh и т.п.)
- ignore_unresponsive_param_nodes: true # Не падать, если нода не отвечает на запросы параметров (защита от зависания при старте)
+ ignore_unresponsive_param_nodes: true # Не падать, если нода не отвечает на запросы параметров (защита от зависания при старте)
\ No newline at end of file
diff --git a/src/iiwa_bringup/launch/digital_twin.launch.py b/src/iiwa_bringup/launch/digital_twin.launch.py
deleted file mode 100644
index c1d04d0..0000000
--- a/src/iiwa_bringup/launch/digital_twin.launch.py
+++ /dev/null
@@ -1,160 +0,0 @@
-from launch import LaunchDescription
-from launch.actions import (
- DeclareLaunchArgument,
- EmitEvent,
- IncludeLaunchDescription,
- OpaqueFunction,
- RegisterEventHandler,
-)
-from launch.conditions import IfCondition
-from launch.event_handlers import OnProcessExit
-from launch.events import Shutdown
-from launch.launch_description_sources import PythonLaunchDescriptionSource
-from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
-from launch_ros.actions import Node
-from launch_ros.substitutions import FindPackageShare
-from moveit_configs_utils import MoveItConfigsBuilder
-
-from iiwa_utils import converter, setting_loader
-
-
-def _runtime_setup(context, *args, **kwatgs):
- setup = []
-
- settings = setting_loader.build_settings(
- settings_path=LaunchConfiguration("setting").perform(context), check_files=True
- )
-
- robot_description = converter.load_robot_description(
- model_path=settings.robot.description,
- robot_name=settings.robot.name,
- xacro_args={
- "initial_positions_file": settings.controller.moveit.initial_positions
- },
- )
-
- rsp_node = Node(
- package="robot_state_publisher",
- executable="robot_state_publisher",
- name="robot_state_publisher",
- output="screen",
- parameters=[{"robot_description": robot_description, "use_sim_time": True}],
- )
-
- webots_launch = IncludeLaunchDescription(
- PythonLaunchDescriptionSource(
- PathJoinSubstitution(
- [
- FindPackageShare("iiwa_bringup"),
- "launch",
- "supported",
- "webots_spawn.launch.py",
- ]
- )
- ),
- launch_arguments={
- "robot_name": str(settings.robot.name),
- "description": str(settings.robot.description),
- "world": str(settings.digital_twin.webots.world),
- "transform": str(settings.digital_twin.webots.transform),
- "rotation": str(settings.digital_twin.webots.rotation),
- "controller_timer": str(settings.digital_twin.webots.controller_timer),
- "controller": str(settings.controller.controller_path),
- "initial_positions_file": str(settings.controller.moveit.initial_positions),
- }.items(),
- )
-
- moveit_configs = (
- MoveItConfigsBuilder("iiwa7", package_name="iiwa_config")
- .robot_description(
- file_path=settings.robot.description,
- mappings={
- "initial_positions_file": settings.controller.moveit.initial_positions
- },
- )
- .robot_description_semantic(file_path=settings.controller.moveit.srdf)
- .robot_description_kinematics(file_path=settings.controller.moveit.kinematics)
- .joint_limits(file_path=settings.controller.moveit.joint_limits)
- .pilz_cartesian_limits(file_path=settings.controller.moveit.pilz_limits)
- .trajectory_execution(file_path=settings.controller.moveit.moveit_controllers)
- .moveit_cpp(file_path=settings.controller.moveit.moveit_cpp)
- .to_moveit_configs()
- )
-
- move_group = Node(
- package="moveit_ros_move_group",
- executable="move_group",
- output="screen",
- parameters=[
- moveit_configs.to_dict(),
- {"robot_description": robot_description},
- {"use_sim_time": True},
- ],
- )
-
- # TODO: не забудь поменять правильное название и имя пакета
- # moveit_py_node = Node(
- # # name="motion_planning_node",
- # package="iiwa_planning",
- # executable="motion_planning",
- # output="both",
- # parameters=[moveit_configs.to_dict()],
- # )
-
-
- rviz_launch = Node(
- condition=IfCondition(LaunchConfiguration("rviz")),
- package="rviz2",
- executable="rviz2",
- name="rviz2",
- arguments=["-d", settings.digital_twin.rviz.config],
- output="log",
- parameters=[
- moveit_configs.robot_description,
- moveit_configs.robot_description_semantic,
- moveit_configs.planning_pipelines,
- moveit_configs.planning_scene_monitor,
- {"use_sim_time": True},
- ],
- )
-
- shutdown_on_rviz_exit = RegisterEventHandler(
- OnProcessExit(target_action=rviz_launch, on_exit=[EmitEvent(event=Shutdown())])
- )
-
- setup += [
- rsp_node,
- webots_launch,
- move_group,
- # moveit_py_node,
- rviz_launch,
- shutdown_on_rviz_exit,
- ]
-
- return setup
-
-
-def generate_launch_description():
- declare_rviz = DeclareLaunchArgument(
- name="rviz",
- default_value="0",
- description="If true|1|yes then launch RViz/MoveIt branch (instead of controllers branch)",
- )
-
- declacre_setting = DeclareLaunchArgument(
- name="setting",
- default_value=PathJoinSubstitution(
- [FindPackageShare("iiwa_config"), "config", "setting.yaml"]
- ),
- description="Absolute path to settings file",
- )
-
- runtime_setup = OpaqueFunction(function=_runtime_setup)
-
- return LaunchDescription(
- [
- declare_rviz,
- declacre_setting,
- runtime_setup,
- ]
- )
diff --git a/src/iiwa_bringup/launch/iiwa.launch.py b/src/iiwa_bringup/launch/iiwa.launch.py
index 9db4571..f806600 100644
--- a/src/iiwa_bringup/launch/iiwa.launch.py
+++ b/src/iiwa_bringup/launch/iiwa.launch.py
@@ -65,7 +65,6 @@ def _runtime_setup(context, *args, **kwargs):
"robot_ip": settings.robot.ip,
"fri_port": str(settings.robot.port),
"simulate": "false",
- "command_mode": settings.robot.command_mode,
"joint_position_tau": str(settings.robot.joint_position_tau),
}
use_sim_time = False
@@ -168,7 +167,6 @@ def _runtime_setup(context, *args, **kwargs):
"transform": str(settings.digital_twin.webots.transform),
"rotation": str(settings.digital_twin.webots.rotation),
"simulate": "false",
- "command_mode": settings.robot.command_mode,
"controller_timer": str(settings.digital_twin.webots.controller_timer),
"fri_cycle_ms": str(settings.robot.fri_cycle_ms),
"joint_position_tau": str(settings.robot.joint_position_tau),
diff --git a/src/iiwa_bringup/launch/supported/controllers.launch.py b/src/iiwa_bringup/launch/supported/controllers.launch.py
index 93bb68f..4e01598 100644
--- a/src/iiwa_bringup/launch/supported/controllers.launch.py
+++ b/src/iiwa_bringup/launch/supported/controllers.launch.py
@@ -19,7 +19,6 @@ def _setup_controllers(context, *args, **kwargs):
controller_timer = LaunchConfiguration("controller_timer").perform(context)
controller_path = LaunchConfiguration("controller_path").perform(context)
simulate = LaunchConfiguration("simulate").perform(context).lower() in ("true", "1", "yes")
- command_mode = LaunchConfiguration("command_mode").perform(context)
controller = LaunchConfiguration("controller").perform(context) # "jtc" | "forward"
fri_cycle_ms = int(LaunchConfiguration("fri_cycle_ms").perform(context))
joint_position_tau = LaunchConfiguration("joint_position_tau").perform(context)
@@ -65,18 +64,10 @@ def _setup_controllers(context, *args, **kwargs):
parameters=[{"use_sim_time": True}],
)
- torque_controller_spawner = Node(
- package="controller_manager",
- executable="spawner",
- output="screen",
- arguments=["iiwa_arm_torque_controller", "--inactive"] + tmo,
- parameters=[{"use_sim_time": True}]
- )
-
jtc_after_jsb = RegisterEventHandler(
OnProcessExit(
target_action=jsb,
- on_exit=[jtc, torque_controller_spawner],
+ on_exit=[jtc],
)
)
@@ -107,9 +98,8 @@ def _setup_controllers(context, *args, **kwargs):
cm = ["--controller-manager", "/controller_manager"]
- # JTC: активен если controller=jtc (и command_mode=position), иначе --inactive
jtc_args = ["iiwa_arm_controller"] + cm
- if command_mode == "torque" or controller == "forward":
+ if controller == "forward":
jtc_args += ["--inactive"]
# ForwardCommandController: активен если controller=forward, иначе --inactive
@@ -117,11 +107,6 @@ def _setup_controllers(context, *args, **kwargs):
if controller != "forward":
forward_args += ["--inactive"]
- # TorqueController: активен если command_mode=torque и controller=jtc
- torque_args = ["iiwa_arm_torque_controller"] + cm
- if not (command_mode == "torque" and controller == "jtc"):
- torque_args += ["--inactive"]
-
jtc = Node(
package="controller_manager",
executable="spawner",
@@ -136,17 +121,10 @@ def _setup_controllers(context, *args, **kwargs):
arguments=forward_args,
)
- torque_controller = Node(
- package="controller_manager",
- executable="spawner",
- output="screen",
- arguments=torque_args,
- )
-
jtc_after_jsb = RegisterEventHandler(
OnProcessExit(
target_action=jsb,
- on_exit=[jtc, forward_controller, torque_controller],
+ on_exit=[jtc, forward_controller],
)
)
@@ -159,7 +137,6 @@ def _setup_controllers(context, *args, **kwargs):
def generate_launch_description():
return LaunchDescription([
- DeclareLaunchArgument("command_mode", default_value="position"),
DeclareLaunchArgument("fri_cycle_ms", default_value="5"),
DeclareLaunchArgument("joint_position_tau", default_value="0.04"),
DeclareLaunchArgument("controller", default_value="jtc"),
diff --git a/src/iiwa_config/config/setting.yaml b/src/iiwa_config/config/setting.yaml
index dd19803..1b569f8 100644
--- a/src/iiwa_config/config/setting.yaml
+++ b/src/iiwa_config/config/setting.yaml
@@ -2,7 +2,6 @@ robot:
name: "iiwa7"
ip: "192.170.10.2"
port: 30200
- command_mode: "position" # torque, position
fri_cycle_ms: 10 # период FRI-цикла: 5 мс (200 Гц) или 10 мс (100 Гц)
joint_position_tau: 0.04 # EMA фильтр позиций [с]: сглаживает команды перед отправкой в FRI
joint_velocity_tau: 0.01 # EMA фильтр скорости [с]: убирает выбросы конечных разностей
diff --git a/src/iiwa_controller/iiwa_hardware_interface_plugin.xml b/src/iiwa_controller/iiwa_hardware_interface_plugin.xml
index 3aa6b31..bb0287f 100644
--- a/src/iiwa_controller/iiwa_hardware_interface_plugin.xml
+++ b/src/iiwa_controller/iiwa_hardware_interface_plugin.xml
@@ -5,7 +5,7 @@
base_class_type="hardware_interface::SystemInterface">
ROS2 hardware interface для KUKA iiwa 7 через FRI (Fast Robot Interface).
- Поддерживает режимы управления: position, torque.
+ Поддерживает управление в режиме position через FRI.
\ No newline at end of file
diff --git a/src/iiwa_controller/include/iiwa_controller/FRIClient.h b/src/iiwa_controller/include/iiwa_controller/FRIClient.h
index 7a4d682..fa112b5 100644
--- a/src/iiwa_controller/include/iiwa_controller/FRIClient.h
+++ b/src/iiwa_controller/include/iiwa_controller/FRIClient.h
@@ -11,11 +11,6 @@
namespace iiwa_controller
{
-enum class CommandMode
-{
- POSITION,
- TORQUE
-};
// Снимок состояния робота захватывается атомарно за один lock в FRI-потоке
// и так же за один lock читается из read() в потоке управления.
@@ -40,7 +35,7 @@ public:
// joint_position_tau — постоянная времени экспоненциального фильтра позиций [с].
// Аналог joint_position_tau из lbr_fri_ros2_stack (по умолчанию 0.04 с = 40 мс).
// Сглаживает скачки команд перед отправкой роботу → убирает писк и стук суставов.
- explicit FRIClient(CommandMode mode = CommandMode::POSITION, double joint_position_tau = 0.04);
+ explicit FRIClient(double joint_position_tau = 0.04);
~FRIClient() override = default;
// Коллбэки FRI SDK, вызываются из friThreadFunc через ClientApplication::step()
@@ -52,19 +47,16 @@ public:
// Потокобезопасное API для ros2_control, вызывается из read() и write()
void setTargetJointPositions(const std::array & q);
- void setTargetJointTorques(const std::array & tau);
IIWAStateSnapshot getStateSnapshot() const;
bool isCommandingActive() const;
KUKA::FRI::ESessionState getSessionState() const;
private:
- CommandMode cmd_mode_;
double joint_position_tau_;
std::atomic session_state_{KUKA::FRI::IDLE};
mutable std::mutex data_mutex_;
std::array target_pos_{};
- std::array target_tau_{};
// Сглаженная позиция, которую реально отправляем роботу.
// Инициализируется IPO-позицией в waitForCommand(), чтобы не было скачка при старте.
std::array filtered_pos_{};
diff --git a/src/iiwa_controller/include/iiwa_controller/IIWAHardwareInterface.hpp b/src/iiwa_controller/include/iiwa_controller/IIWAHardwareInterface.hpp
index a523905..79f231e 100644
--- a/src/iiwa_controller/include/iiwa_controller/IIWAHardwareInterface.hpp
+++ b/src/iiwa_controller/include/iiwa_controller/IIWAHardwareInterface.hpp
@@ -59,7 +59,6 @@ private:
std::string robot_ip_;
int fri_port_{30200};
bool simulate_{false};
- std::string cmd_mode_str_{"position"};
double joint_position_tau_{0.04};
// EMA-фильтр скорости: сглаживает одиночные выбросы конечных разностей.
// joint_velocity_tau = 0 отключает фильтр (raw finite difference).
@@ -82,9 +81,7 @@ private:
std::array h_eff_;
std::array h_ext_;
- // Хэндлы командных интерфейсов
std::array h_cmd_pos_;
- std::array h_cmd_eff_;
// Вычисление скорости: конечные разности + EMA-фильтр
std::array prev_pos_{};
@@ -100,7 +97,6 @@ private:
rclcpp::Clock throttle_clock_{RCL_STEADY_TIME};
- CommandMode parseCommandMode(const std::string & mode_str) const;
};
} // namespace iiwa_controller
diff --git a/src/iiwa_controller/src/FRIClient.cpp b/src/iiwa_controller/src/FRIClient.cpp
index f70ac30..bb856f5 100644
--- a/src/iiwa_controller/src/FRIClient.cpp
+++ b/src/iiwa_controller/src/FRIClient.cpp
@@ -20,11 +20,10 @@ static const char * friStateName(KUKA::FRI::ESessionState s)
}
}
-FRIClient::FRIClient(CommandMode mode, double joint_position_tau)
-: cmd_mode_(mode), joint_position_tau_(joint_position_tau)
+FRIClient::FRIClient(double joint_position_tau)
+: joint_position_tau_(joint_position_tau)
{
target_pos_.fill(0.0);
- target_tau_.fill(0.0);
filtered_pos_.fill(0.0);
}
@@ -86,12 +85,6 @@ void FRIClient::waitForCommand()
std::memcpy(filtered_pos_.data(), snapshot_.ipo_pos.data(), N_JOINTS * sizeof(double));
robotCommand().setJointPosition(filtered_pos_.data());
-
- if (cmd_mode_ == CommandMode::TORQUE) {
- // Пока контроллер не синхронизирован, момент держим на нуле
- target_tau_.fill(0.0);
- robotCommand().setTorque(target_tau_.data());
- }
}
// Вызывается в COMMANDING_ACTIVE, основной цикл управления
@@ -110,10 +103,6 @@ void FRIClient::command()
robotCommand().setJointPosition(filtered_pos_.data());
- if (cmd_mode_ == CommandMode::TORQUE) {
- robotCommand().setTorque(target_tau_.data());
- }
-
// Захватываем снимок ПОСЛЕ EMA: measured_pos = filtered_pos_ = что робот только что получил.
captureCommandingData();
}
@@ -131,11 +120,6 @@ void FRIClient::onStateChange(
newState == KUKA::FRI::MONITORING_WAIT ||
newState == KUKA::FRI::MONITORING_READY)
{
- std::lock_guard lock(data_mutex_);
- target_tau_.fill(0.0);
- RCLCPP_WARN(
- rclcpp::get_logger("FRIClient"),
- "FRI сессия неактивна, моменты обнулены");
}
}
@@ -152,17 +136,6 @@ void FRIClient::setTargetJointPositions(const std::array & q)
target_pos_ = q;
}
-void FRIClient::setTargetJointTorques(const std::array & tau)
-{
- for (const auto & v : tau) {
- if (!std::isfinite(v)) {
- return;
- }
- }
- std::lock_guard lock(data_mutex_);
- target_tau_ = tau;
-}
-
IIWAStateSnapshot FRIClient::getStateSnapshot() const
{
std::lock_guard lock(data_mutex_);
diff --git a/src/iiwa_controller/src/IIWAHardwareInterface.cpp b/src/iiwa_controller/src/IIWAHardwareInterface.cpp
index d395cb3..22ba74c 100644
--- a/src/iiwa_controller/src/IIWAHardwareInterface.cpp
+++ b/src/iiwa_controller/src/IIWAHardwareInterface.cpp
@@ -46,15 +46,13 @@ CallbackReturn IIWAHardwareInterface::on_init(
robot_ip_ = getParam(info, "robot_ip", "192.170.10.2");
fri_port_ = std::stoi(getParam(info, "fri_port", "30200"));
simulate_ = (getParam(info, "simulate", "false") == "true");
- cmd_mode_str_ = getParam(info, "command_mode", "position");
joint_position_tau_ = std::stod(getParam(info, "joint_position_tau", "0.04"));
joint_velocity_tau_ = std::stod(getParam(info, "joint_velocity_tau", "0.01"));
RCLCPP_INFO(rclcpp::get_logger(LOG),
- "on_init: ip=%s port=%d simulate=%s mode=%s pos_tau=%.3f vel_tau=%.3f",
+ "on_init: ip=%s port=%d simulate=%s pos_tau=%.3f vel_tau=%.3f",
robot_ip_.c_str(), fri_port_,
simulate_ ? "true" : "false",
- cmd_mode_str_.c_str(),
joint_position_tau_,
joint_velocity_tau_);
@@ -99,7 +97,7 @@ CallbackReturn IIWAHardwareInterface::on_configure(const rclcpp_lifecycle::State
return CallbackReturn::SUCCESS;
}
- fri_client_ = std::make_unique(parseCommandMode(cmd_mode_str_), joint_position_tau_);
+ fri_client_ = std::make_unique(joint_position_tau_);
// 100 мс таймаут recvfrom — поток корректно завершится после disconnect().
connection_ = std::make_unique(100);
app_ = std::make_unique(*connection_, *fri_client_);
@@ -132,10 +130,8 @@ CallbackReturn IIWAHardwareInterface::on_activate(const rclcpp_lifecycle::State
h_eff_[i] = get_state_interface_handle(jn + "/" + hardware_interface::HW_IF_EFFORT);
h_ext_[i] = get_state_interface_handle(jn + "/external_torque");
h_cmd_pos_[i] = get_command_interface_handle(jn + "/" + hardware_interface::HW_IF_POSITION);
- h_cmd_eff_[i] = get_command_interface_handle(jn + "/" + hardware_interface::HW_IF_EFFORT);
- if (!h_pos_[i] || !h_vel_[i] || !h_eff_[i] || !h_ext_[i] ||
- !h_cmd_pos_[i] || !h_cmd_eff_[i])
+ if (!h_pos_[i] || !h_vel_[i] || !h_eff_[i] || !h_ext_[i] || !h_cmd_pos_[i])
{
RCLCPP_FATAL(rclcpp::get_logger(LOG),
"Не удалось получить хэндл интерфейса для сустава '%s'. "
@@ -199,7 +195,7 @@ CallbackReturn IIWAHardwareInterface::on_deactivate(const rclcpp_lifecycle::Stat
for (size_t i = 0; i < N_JOINTS; ++i) {
h_pos_[i] = h_vel_[i] = h_eff_[i] = h_ext_[i] = nullptr;
- h_cmd_pos_[i] = h_cmd_eff_[i] = nullptr;
+ h_cmd_pos_[i] = nullptr;
}
velocity_initialized_ = false;
@@ -342,23 +338,14 @@ hardware_interface::return_type IIWAHardwareInterface::write(
return hardware_interface::return_type::OK;
}
- std::array pos_cmd{}, tau_cmd{};
+ std::array pos_cmd{};
for (size_t i = 0; i < N_JOINTS; ++i) {
get_command(h_cmd_pos_[i], pos_cmd[i], false);
- get_command(h_cmd_eff_[i], tau_cmd[i], false);
}
fri_client_->setTargetJointPositions(pos_cmd);
- fri_client_->setTargetJointTorques(tau_cmd);
return hardware_interface::return_type::OK;
}
-// ── parseCommandMode ───────────────────────────────────────────────────────────
-
-CommandMode IIWAHardwareInterface::parseCommandMode(const std::string & mode_str) const
-{
- return (mode_str == "torque") ? CommandMode::TORQUE : CommandMode::POSITION;
-}
-
} // namespace iiwa_controller
diff --git a/src/iiwa_description/urdf/iiwa7.urdf.xacro b/src/iiwa_description/urdf/iiwa7.urdf.xacro
index 71dec61..e9f58e9 100644
--- a/src/iiwa_description/urdf/iiwa7.urdf.xacro
+++ b/src/iiwa_description/urdf/iiwa7.urdf.xacro
@@ -6,7 +6,6 @@
-
@@ -147,7 +146,6 @@
$(arg robot_ip)
$(arg fri_port)
false
- $(arg command_mode)
$(arg joint_position_tau)
$(arg joint_velocity_tau)
@@ -157,10 +155,7 @@
-2.97
2.97
-
- -200
- 200
-
+
${initial_positions['joint1']}
@@ -173,10 +168,7 @@
-2.09
2.09
-
- -200
- 200
-
+
${initial_positions['joint2']}
@@ -189,10 +181,7 @@
-2.97
2.97
-
- -200
- 200
-
+
${initial_positions['joint3']}
@@ -205,10 +194,7 @@
-2.09
2.09
-
- -200
- 200
-
+
${initial_positions['joint4']}
@@ -221,10 +207,7 @@
-2.97
2.97
-
- -200
- 200
-
+
${initial_positions['joint5']}
@@ -237,10 +220,7 @@
-2.09
2.09
-
- -200
- 200
-
+
${initial_positions['joint6']}
@@ -253,10 +233,7 @@
-3.05
3.05
-
- -200
- 200
-
+
${initial_positions['joint7']}
diff --git a/src/iiwa_planning/scripts/move_to_pose_server.py b/src/iiwa_planning/scripts/move_to_pose_server.py
index cc4d361..1f33f09 100644
--- a/src/iiwa_planning/scripts/move_to_pose_server.py
+++ b/src/iiwa_planning/scripts/move_to_pose_server.py
@@ -38,10 +38,10 @@ class IiwaMotionServer(Node):
"""Сервер управления движением манипулятора iiwa.
Предоставляет:
- - action iiwa/move_to_pose — перемещение в декартову позу
- - action iiwa/move_to_joints — перемещение по суставным координатам
- - service iiwa/move_to_named — перемещение в именованную позу из SRDF
- - service iiwa/stop — немедленная остановка движения
+ - action cobot/move_to_pose — перемещение в декартову позу
+ - action cobot/move_to_joints — перемещение по суставным координатам
+ - service cobot/move_to_named — перемещение в именованную позу из SRDF
+ - service cobot/stop — немедленная остановка движения
"""
def __init__(self):
@@ -75,19 +75,19 @@ class IiwaMotionServer(Node):
cb = ReentrantCallbackGroup()
ActionServer(
- self, MoveToPose, "iiwa/move_to_pose", self._execute_pose,
+ self, MoveToPose, "cobot/move_to_pose", self._execute_pose,
callback_group=cb,
goal_callback=lambda _: GoalResponse.ACCEPT,
cancel_callback=lambda _: CancelResponse.ACCEPT,
)
ActionServer(
- self, MoveToJoints, "iiwa/move_to_joints", self._execute_joints,
+ self, MoveToJoints, "cobot/move_to_joints", self._execute_joints,
callback_group=cb,
goal_callback=lambda _: GoalResponse.ACCEPT,
cancel_callback=lambda _: CancelResponse.ACCEPT,
)
- self.create_service(MoveToNamedPose, "iiwa/move_to_named", self._handle_named, callback_group=cb)
- self.create_service(Trigger, "iiwa/stop", self._handle_stop, callback_group=cb)
+ self.create_service(MoveToNamedPose, "cobot/move_to_named", self._handle_named, callback_group=cb)
+ self.create_service(Trigger, "cobot/stop", self._handle_stop, callback_group=cb)
def _make_plan_params(self, pipeline: str, planner_id: str, plan_time: float, velocity_scale: float, accel_scale: float | None = None) -> PlanRequestParameters:
params = PlanRequestParameters(self._moveit, self._planning_group)
diff --git a/src/iiwa_utils/iiwa_utils/setting_loader.py b/src/iiwa_utils/iiwa_utils/setting_loader.py
index 8fc3d98..3369b5d 100644
--- a/src/iiwa_utils/iiwa_utils/setting_loader.py
+++ b/src/iiwa_utils/iiwa_utils/setting_loader.py
@@ -13,7 +13,6 @@ class RobotCfg:
name: str
ip: str
port: int
- command_mode: str
description: str
fri_cycle_ms: int
joint_position_tau: float
@@ -247,7 +246,6 @@ def build_settings(settings_path: str, check_files: bool = True) -> Settings:
name=str(require(robot_raw, "name")),
ip=str(require(robot_raw, "ip")),
port=int(require(robot_raw, "port")),
- command_mode=str(require(robot_raw, "command_mode")),
description=resolve_path(str(require(robot_raw, "description")), settings_dir),
fri_cycle_ms=int(robot_raw.get("fri_cycle_ms", 5)),
joint_position_tau=float(robot_raw.get("joint_position_tau", 0.04)),