Compare commits

31 Commits

Author SHA1 Message Date
597ab48699 feat: replace stdlib logging with hivecore_logger SDK
- Import hivecore_logger alongside stdlib logging
- Replace _setup_file_logging() with hivecore_logger.init() using
  node_name='ctrlgui', log_dir from ROS2 param log_base_dir,
  enable_signal_handlers=False and enable_auto_shutdown_hook=False
  to avoid conflicts with NiceGUI/ROS2 lifecycle
- Obtain logger instance via hivecore_logger.get_logger(); all
  existing self.file_logger call sites (info/warning/error) unchanged
- Add hivecore_logger.stop() in shutdown() to flush async log queue
- Update default log_base_dir parameter to /var/log/robot
- Log output format: [timestamp] [LEVEL] [ctrlgui] [thread] [file:line] msg
  written to <log_dir>/<YYYYMMDD>/ctrlgui.log with console echo
2026-03-04 18:40:10 +08:00
NuoDaJia02
1968580877 增加控制按钮 2026-02-05 18:06:58 +08:00
NuoDaJia02
d7ad3991e1 增加配置文件和launch文件 2026-02-01 11:09:49 +08:00
NuoDaJia02
04d0606034 增加数据采集开关 2026-02-01 11:03:27 +08:00
NuoDaJia02
5a1c55b3d8 优化数据采集 2026-01-29 18:45:51 +08:00
NuoDaJia02
ec279ec154 gen images and skill info 2026-01-27 19:49:27 +08:00
NuoDaJia02
1cd009fd6b 增加数据采集 2026-01-27 17:37:58 +08:00
NuoDaJia02
695af8196d add gripper_status 2026-01-20 10:32:32 +08:00
NuoDaJia02
d981bb5d7c optimize gripper code 2026-01-20 09:59:31 +08:00
NuoDaJia02
fde2503b8c optimize code 2026-01-15 14:29:12 +08:00
NuoDaJia02
595b1ad95e fix bugs 2026-01-15 14:06:59 +08:00
NuoDaJia02
59bc92e4f3 add arm error page 2026-01-14 17:42:30 +08:00
NuoDaJia02
5578cc312e 优化界面 2026-01-14 16:34:05 +08:00
NuoDaJia02
13e0672fd6 add vision recg 2026-01-09 11:02:00 +08:00
NuoDaJia02
1601ed4b85 add left arm vision grasp 2026-01-08 17:25:37 +08:00
NuoDaJia02
86812ba326 update arm default joint angles 2026-01-08 13:14:28 +08:00
NuoDaJia02
f6c0a6e6d6 支持两个夹爪 2026-01-07 10:02:38 +08:00
9eacb3529b fix conflict 2025-12-04 11:09:39 +08:00
004036ac40 屏蔽夹爪action result,以免影响brain 2025-12-04 11:07:48 +08:00
939107b636 merge remote 2025-11-27 11:02:34 +08:00
c07360d52d add action feedback 2025-11-27 10:57:25 +08:00
04ea4bab7d modify JzCmd -> GripperCmd 2025-11-27 10:35:49 +08:00
dbc1173470 add action feedback 2025-11-25 17:55:46 +08:00
fa86790ab1 support arm_left_right_select 2025-11-24 09:01:34 +08:00
5dcb7f65a1 modify default body_id 2025-11-21 18:24:20 +08:00
2208fc1ff2 add gripper control 2025-11-21 14:12:41 +08:00
c053bac1cd add vision grasp 2025-11-20 16:58:17 +08:00
NuoDaJia02
446d07364a add cancel task 2025-11-11 08:45:55 +08:00
NuoDaJia02
af72e8302d add move wheel control btn 2025-11-10 11:00:27 +08:00
NuoDaJia02
ff8ef766c1 modify default value 2025-11-09 17:59:22 +08:00
NuoDaJia02
97bda3dbe7 修改名称 2025-11-08 18:51:14 +08:00
4 changed files with 1069 additions and 205 deletions

33
config/ctrlgui.yaml Normal file
View File

@@ -0,0 +1,33 @@
ctrlgui_node:
ros__parameters:
collection_enabled: false
data_base_dir: "/home/demo/hivecore_robot_os1/data"
log_base_dir: "/var/log/robot"
queue_size: 10
action_server_wait_timeout_sec: 1.0
work_info_log_throttle_sec: 1.0
joint_state_log_throttle_sec: 1.0
work_info_log_every_n: 100
bt_xml_log_max_len: 100
ui_update_period_sec: 0.5
host: "0.0.0.0"
port: 8080
topic_led_cmd: "/led_cmd"
service_rebuild_now: "/cerebrum/rebuild_now"
topic_robot_work_info: "/robot_work_info"
action_execute_bt: "/execute_bt_action"
topic_joint_states: "/joint_states"
action_gripper0_cmd: "/gripper_cmd0"
action_gripper1_cmd: "/gripper_cmd1"
topic_gripper0_status: "/gripper0/status"
topic_gripper1_status: "/gripper1/status"
topic_arm_errors: "/arm_errors"
service_clear_arm_error: "clear_arm_error"
topic_top_color: "/camera/color/image_raw"
topic_top_depth: "/camera/depth/image_raw"
topic_left_color: "/camera1/camera1/color/image_raw"
topic_left_depth: "/camera1/camera1/depth/image_rect_raw"
topic_right_color: "/camera2/camera2/color/image_raw"
topic_right_depth: "/camera2/camera2/depth/image_rect_raw"

File diff suppressed because it is too large Load Diff

View File

@@ -2,6 +2,8 @@ from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node
from ament_index_python.packages import get_package_share_directory
import os
def generate_launch_description() -> LaunchDescription:
@@ -15,8 +17,12 @@ def generate_launch_description() -> LaunchDescription:
port_arg = DeclareLaunchArgument(
'port', default_value='8080',
description='TCP port for NiceGUI')
params_file_arg = DeclareLaunchArgument(
'params_file',
default_value=os.path.join(get_package_share_directory('ctrlgui'), 'config', 'ctrlgui.yaml'),
description='Path to the ctrlgui parameter file')
ld = LaunchDescription([node_name_arg, host_arg, port_arg])
ld = LaunchDescription([node_name_arg, host_arg, port_arg, params_file_arg])
ctrlgui_node = Node(
package='ctrlgui',
@@ -24,11 +30,13 @@ def generate_launch_description() -> LaunchDescription:
name=LaunchConfiguration('node_name'),
output='screen',
emulate_tty=True,
parameters=[],
env={
'HOST': LaunchConfiguration('host'),
'PORT': LaunchConfiguration('port'),
},
parameters=[
LaunchConfiguration('params_file'),
{
'host': LaunchConfiguration('host'),
'port': LaunchConfiguration('port'),
},
],
)
ld.add_action(ctrlgui_node)

View File

@@ -17,6 +17,7 @@ setup(
['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
('share/' + package_name + '/launch', ['launch/ctrlgui.launch.py']),
('share/' + package_name + '/config', ['config/ctrlgui.yaml']),
# Install top-level static assets into share for runtime serving
('share/' + package_name + '/static', [
*glob(os.path.join('static', '*'))