0953e6fc-7112-45d0-b518-06ece124c72a-ce8a0540250aae09042b8432ecb88d58_720.jpg
0953e6fc-7112-45d0-b518-06ece124c72a-ce8a0540250aae09042b8432ecb88d58_720.jpg
400f79ff-8a2f-4584-b099-ffe7dbc31462.jpeg
机械臂,遥操作+加力反馈,如何实现?
遥操作:通过手柄,手机,或者任何形式的“遥控器”遥控机械臂的运动。最简单的形式就是以一个机械臂(主臂)遥控另一个机械臂(从臂)。
力反馈:当从臂碰到障碍物时,主臂可以以力的形式感受到这个障碍物,所谓“感受”就是操作者感受到主臂的力。
代码:https://gitee.com/qingqing-gaq/feel_force.git
视频:https://www.bilibili.com/video/BV1KoEqzyEFR/?vd_source=36451ca805358187c4a0efa1c5694b35
我的实现思路:
软件:rso2
硬件:双通道usb转can模块,六个达妙4310电机。
六个电机,组成两个三自由度机械臂。一个can通道控制一个机械臂。
大体逻辑:
主臂时重力补偿模式,因为只有重力补偿才能任意拖动。主臂把实时的关节位置,发送给从臂,因此从臂必然是位置控制模式,这样才能跟踪主臂的位置。
那么主臂如何感受从臂的力呢?这里就需要电机有力矩接口了(达妙电机的mit模式),当从臂电机受到阻力时,pid控制力就会变大,电机反馈会的力也会变大,这个变大的值就是阻力了。把这个力反馈给主臂即可。
程序运行逻辑:
23467808-ec76-44af-b4b5-f339ae8f85d4.png
操作逻辑的代码:
其中:主臂位置发送给从臂的逻辑好理解。
pos2[i] = curret_joint_states.at(i).position; //curret_joint_states.at(i).position:主臂的实时关节位置 //pos2[i]:发送给从臂的关节位置这一句是从臂的力矩反馈给主臂。有一步操作是从臂反馈的力矩减去了重力补偿力矩,这是因为,反馈的电机力矩是pid产生的。这个pid产生的控制力矩就包含重力力矩,如果把这个力也算上发送给主臂,那主臂就会变的很称,因为从臂把重力也传过来了。
tor[i] += -0.5 * (curret_joint_states2.at(i).torque - tor2[i]); //tor[i]: 发送给主臂的关节力矩 //curret_joint_states2.at(i).torque:从臂电机反馈会来的力矩 //tor2[i]:发送给从臂的重力补偿力矩。 //-0.5:缩放系数这个if判断的作用是,避免从臂传来的力一直在小幅度波动,只有从臂反馈的力大于一个值,这个力才会被加载到主臂上。
float torque_threshold = 0.04f; // 设置阈值 //从臂受到的阻力,返回给主臂 for (size_t i = 0; i < arm->getDof(); i++) { if (std::abs(curret_joint_states2.at(i).torque) > torque_threshold) { tor[i] += -0.5 * (curret_joint_states2.at(i).torque - tor2[i]); // 如果超过阈值,按原逻辑计算 } else { tor[i] += 0.0f; // 否则赋值为 0 } }这又是一个神奇的操作。就是让从臂有期望速度。作用就是会影响操作手感。
vel2[i] = 0.10 * curret_joint_states.at(i).velocity; // 系数越大手感越硬。ok这就是整个的实现逻辑,非常简陋。
程序框架简介:https://zwf9l1z0bm3.feishu.cn/docx/Ee3EdW8meoy79uxzBQVcXe11nfh?from=from_copylink
qq交流群:523255719
50a727c9-ba1a-440f-9dcf-f9c4d06d0eea-image.png
如图所示,按书中6.2.3章修改代码之后,报错:No link elements found in urdf file。ros版本是:ROS2-jazzy 24.04。请问如何解决呢?谢谢!
鱼哥 我是想写一个自己的局部路径规划器,具体功能是这样的,在没有碰到新添加的障碍物时就是用路径跟踪的方法进行移动,如果扫描到新障碍物就调用局部路径规划器进行避障,前一部分已经完成了,现在小车遇到新障碍物会自动调用全局路径规划器进行避障,而我想要的是用局部路径规划器就是ros2_navigation里面那个dwb局部控制器来进行避障,我想问一下,如何在我的代码就比如以您课程里面的代码局部规划器代码为例子,如何在我的代码的基础上调用dwb控制器的插件来完成避障,主要是这个调用问题怎么解决,是要重新再写一个控制器插件吗,如果是的话 又要怎样来写这个新的控制器插件呢
Screenshot from 2025-05-16 13-48-38.png
如图所示,按书中6.2.3章修改代码之后,报错:No link elements found in urdf file。ros版本是:ROS2-jazzy 24.04。请问如何解决呢?谢谢!
我这边只有热点,可不可以直接用串口与ros进行节点通信啊
moveit 添加障碍物路径规划如何有时会碰撞有时不会,咋调节,使用的默认ompl的geometric::RRTConnect,之前尝试设置过collision的padding但是还是一样
e061e652-e318-48b1-acd9-bd3bfb82d252-image.png
上图蓝色线段是teb规划的路径(仿真环境)
2f5d56cb-d451-4b79-8f8d-c00aaf2cacb4-image.png
上图黑色线段是teb规划的路径(实车环境)
我想请教以下,可以修改哪些参数增加路径的平滑性
我将两个单线激光雷达的数据传入cartographer,设置了num_laser_scans = 2,将话题进行了重映射,小车静止不动,定位结果也会乱飞,这个是什么问题?
ros aruco识别不上
相机内参标定好之后,更改了文件,aruco识别不上标定板
背景:
我正在做机械臂的手眼标定,相机采用单目相机,我首先完成了棋盘格的相机内参标定,在相机启动launch文件下添加了内参标定的文件,同样在小鱼gitee上提供的手眼标定文件中aruco识别文件改了标定的参数,及地址。采用的是ID0
问题:
运行程序后,将板子放置摄像头前面,丝毫没有变化
如果有人能够解释为什么会发生这种情况,或者我的理解有误,我将非常感激!
Nav2启动时Rviz2里无法正常加载地图。
系统配置如下:
Linux:Ubuntu 22.04
ROS2:Humble
雷达话题:/scan
里程计话题:bringup发布的是/odom1,和IMU通过ekf融合后输出的话题是/odom
配置文件如下:
amcl:
ros__parameters:
use_sim_time: False
alpha1: 0.2
alpha2: 0.2
alpha3: 0.2
alpha4: 0.2
alpha5: 0.2
base_frame_id: "base_footprint"
beam_skip_distance: 0.5
beam_skip_error_threshold: 0.9
beam_skip_threshold: 0.3
do_beamskip: false
global_frame_id: "map"
lambda_short: 0.1
laser_likelihood_max_dist: 2.0
laser_max_range: 100.0
laser_min_range: -1.0
laser_model_type: "likelihood_field"
max_beams: 60
max_particles: 2000
min_particles: 500
odom_frame_id: "odom"
amcl_map_client:
ros__parameters:
use_sim_time: False
amcl_rclcpp_node:
ros__parameters:
use_sim_time: False
bt_navigator:
ros__parameters:
use_sim_time: False
global_frame: map
robot_base_frame: base_link
odom_topic: /odom
bt_loop_duration: 10
default_server_timeout: 20
# default_bt_xml_filename: "/home/hermes/161/fishbot/src/fishbot_navigation2/xml/my_xml.xml"
# default_nav_to_pose_bt_xml: "/home/hermes/161/fishbot/src/fishbot_navigation2/xml/my_xml.xml"
# 'default_nav_through_poses_bt_xml' and 'default_nav_to_pose_bt_xml' are use defaults:
# nav2_bt_navigator/navigate_to_pose_w_replanning_and_recovery.xml
# nav2_bt_navigator/navigate_through_poses_w_replanning_and_recovery.xml
# They can be set here or via a RewrittenYaml remap from a parent launch file to Nav2.
plugin_lib_names:
- nav2_compute_path_to_pose_action_bt_node
- nav2_compute_path_through_poses_action_bt_node
- nav2_smooth_path_action_bt_node
- nav2_follow_path_action_bt_node
- nav2_spin_action_bt_node
- nav2_wait_action_bt_node
- nav2_back_up_action_bt_node
- nav2_drive_on_heading_bt_node
- nav2_clear_costmap_service_bt_node
- nav2_is_stuck_condition_bt_node
- nav2_goal_reached_condition_bt_node
- nav2_goal_updated_condition_bt_node
- nav2_globally_updated_goal_condition_bt_node
- nav2_is_path_valid_condition_bt_node
- nav2_initial_pose_received_condition_bt_node
- nav2_reinitialize_global_localization_service_bt_node
- nav2_rate_controller_bt_node
- nav2_distance_controller_bt_node
- nav2_speed_controller_bt_node
- nav2_truncate_path_action_bt_node
- nav2_truncate_path_local_action_bt_node
- nav2_goal_updater_node_bt_node
- nav2_recovery_node_bt_node
- nav2_pipeline_sequence_bt_node
- nav2_round_robin_node_bt_node
- nav2_transform_available_condition_bt_node
- nav2_time_expired_condition_bt_node
- nav2_path_expiring_timer_condition
- nav2_distance_traveled_condition_bt_node
- nav2_single_trigger_bt_node
- nav2_is_battery_low_condition_bt_node
- nav2_navigate_through_poses_action_bt_node
- nav2_navigate_to_pose_action_bt_node
- nav2_remove_passed_goals_action_bt_node
- nav2_planner_selector_bt_node
- nav2_controller_selector_bt_node
- nav2_goal_checker_selector_bt_node
- nav2_controller_cancel_bt_node
- nav2_path_longer_on_approach_bt_node
- nav2_wait_cancel_bt_node
- nav2_spin_cancel_bt_node
- nav2_back_up_cancel_bt_node
- nav2_drive_on_heading_cancel_bt_node
bt_navigator_rclcpp_node:
ros__parameters:
use_sim_time: False
controller_server:
ros__parameters:
use_sim_time: False
controller_frequency: 20.0
min_x_velocity_threshold: 0.001
min_y_velocity_threshold: 0.001
min_theta_velocity_threshold: 0.001
failure_tolerance: 0.9
progress_checker_plugin: "progress_checker"
goal_checker_plugins: ["general_goal_checker"] # "precise_goal_checker"
controller_plugins: ["FollowPath"]
controller_server_rclcpp_node:
ros__parameters:
use_sim_time: False
local_costmap:
local_costmap:
ros__parameters:
update_frequency: 5.0
publish_frequency: 2.0
global_frame: odom
robot_base_frame: base_link
use_sim_time: False
rolling_window: true
width: 3
height: 3
resolution: 0.05
robot_radius: 0.45
plugins: ["static_layer", "obstacle_layer", "voxel_layer", "inflation_layer"]
inflation_layer:
plugin: "nav2_costmap_2d::InflationLayer"
cost_scaling_factor: 3.0
inflation_radius: 0.6
obstacle_layer:
plugin: "nav2_costmap_2d::ObstacleLayer"
enabled: True
observation_sources: scan
scan:
topic: /scan
max_obstacle_height: 2.0
clearing: True
marking: True
data_type: "LaserScan"
raytrace_max_range: 3.0
raytrace_min_range: 0.0
obstacle_max_range: 2.5
obstacle_min_range: 0.0
voxel_layer:
plugin: "nav2_costmap_2d::VoxelLayer"
enabled: True
publish_voxel_map: True
origin_z: 0.0
z_resolution: 0.05
z_voxels: 16
max_obstacle_height: 2.0
mark_threshold: 0
observation_sources: scan
scan:
topic: /scan
max_obstacle_height: 2.0
clearing: True
marking: True
data_type: "LaserScan"
raytrace_max_range: 3.0
raytrace_min_range: 0.0
obstacle_max_range: 2.5
obstacle_min_range: 0.0
static_layer:
plugin: "nav2_costmap_2d::StaticLayer"
map_subscribe_transient_local: True
always_send_full_costmap: True
local_costmap_client:
ros__parameters:
use_sim_time: False
local_costmap_rclcpp_node:
ros__parameters:
use_sim_time: False
global_costmap:
global_costmap:
ros__parameters:
update_frequency: 1.0
publish_frequency: 1.0
global_frame: map
robot_base_frame: base_link
use_sim_time: False
robot_radius: 0.45
resolution: 0.05
track_unknown_space: true
plugins: ["static_layer", "obstacle_layer", "inflation_layer"]
obstacle_layer:
plugin: "nav2_costmap_2d::ObstacleLayer"
enabled: True
observation_sources: scan
scan:
topic: /scan
max_obstacle_height: 2.0
clearing: True
marking: True
data_type: "LaserScan"
raytrace_max_range: 3.0
raytrace_min_range: 0.0
obstacle_max_range: 2.5
obstacle_min_range: 0.0
static_layer:
plugin: "nav2_costmap_2d::StaticLayer"
map_subscribe_transient_local: True
inflation_layer:
plugin: "nav2_costmap_2d::InflationLayer"
cost_scaling_factor: 3.0
inflation_radius: 0.6
always_send_full_costmap: True
global_costmap_client:
ros__parameters:
use_sim_time: False
global_costmap_rclcpp_node:
ros__parameters:
use_sim_time: False
map_server:
ros__parameters:
use_sim_time: False
yaml_filename: "turtlebot3_world.yaml"
map_saver:
ros__parameters:
use_sim_time: False
save_map_timeout: 5.0
free_thresh_default: 0.25
occupied_thresh_default: 0.65
map_subscribe_transient_local: True
planner_server:
ros__parameters:
expected_planner_frequency: 20.0
use_sim_time: False
planner_plugins: ["GridBased"]
GridBased:
plugin: "nav2_navfn_planner/NavfnPlanner"
tolerance: 0.5
use_astar: false
allow_unknown: true
planner_server_rclcpp_node:
ros__parameters:
use_sim_time: False
smoother_server:
ros__parameters:
use_sim_time: False
smoother_plugins: ["simple_smoother"]
simple_smoother:
plugin: "nav2_smoother::SimpleSmoother"
tolerance: 1.0e-10
max_its: 1000
do_refinement: True
behavior_server:
ros__parameters:
costmap_topic: local_costmap/costmap_raw
footprint_topic: local_costmap/published_footprint
cycle_frequency: 10.0
behavior_plugins: ["spin", "backup", "drive_on_heading", "wait"]
spin:
plugin: "nav2_behaviors/Spin"
backup:
plugin: "nav2_behaviors/BackUp"
drive_on_heading:
plugin: "nav2_behaviors/DriveOnHeading"
wait:
plugin: "nav2_behaviors/Wait"
global_frame: odom
robot_base_frame: base_link
transform_tolerance: 0.1
use_sim_time: False
simulate_ahead_time: 2.0
max_rotational_vel: 1.0
min_rotational_vel: 0.4
rotational_acc_lim: 3.2
robot_state_publisher:
ros__parameters:
use_sim_time: False
waypoint_follower:
ros__parameters:
loop_rate: 20
stop_on_failure: false
waypoint_task_executor_plugin: "wait_at_waypoint"
wait_at_waypoint:
plugin: "nav2_waypoint_follower::WaitAtWaypoint"
enabled: True
waypoint_pause_duration: 200
报错如下:
[INFO] [launch]: All log files can be found below /home/agx/.ros/log/2025-05-14-08-08-56-824411-ubuntu-7779
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [component_container_isolated-1]: process started with pid [7792]
[INFO] [rviz2-2]: process started with pid [7794]
[component_container_isolated-1] [INFO] [1747224537.918626279] [nav2_container]: Load Library: /home/agx/nav2_ws/install/nav2_map_server/lib/libmap_server_core.so
[component_container_isolated-1] [INFO] [1747224537.962328846] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_map_server::CostmapFilterInfoServer>
[component_container_isolated-1] [INFO] [1747224537.962416269] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_map_server::MapSaver>
[component_container_isolated-1] [INFO] [1747224537.962429933] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_map_server::MapServer>
[component_container_isolated-1] [INFO] [1747224537.962438829] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_map_server::MapServer>
[component_container_isolated-1] [INFO] [1747224537.976989477] [map_server]:
[component_container_isolated-1] map_server lifecycle node launched.
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/map_server' in container '/nav2_container'
[component_container_isolated-1] Waiting on external lifecycle transitions to activate
[component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[component_container_isolated-1] [INFO] [1747224537.977090020] [map_server]: Creating
[component_container_isolated-1] [INFO] [1747224537.983997123] [nav2_container]: Load Library: /home/agx/nav2_ws/install/nav2_amcl/lib/libamcl_core.so
[component_container_isolated-1] [INFO] [1747224537.997021194] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_amcl::AmclNode>
[component_container_isolated-1] [INFO] [1747224537.997120297] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_amcl::AmclNode>
[component_container_isolated-1] [INFO] [1747224538.011386499] [amcl]:
[component_container_isolated-1] amcl lifecycle node launched.
[component_container_isolated-1] Waiting on external lifecycle transitions to activate
[component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[component_container_isolated-1] [INFO] [1747224538.016541139] [amcl]: Creating
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/amcl' in container '/nav2_container'
[component_container_isolated-1] [INFO] [1747224538.031733797] [nav2_container]: Load Library: /home/agx/nav2_ws/install/nav2_lifecycle_manager/lib/libnav2_lifecycle_manager_core.so
[component_container_isolated-1] [INFO] [1747224538.035436258] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_lifecycle_manager::LifecycleManager>
[component_container_isolated-1] [INFO] [1747224538.035504577] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_lifecycle_manager::LifecycleManager>
[component_container_isolated-1] [INFO] [1747224538.049036003] [lifecycle_manager_localization]: Creating
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/lifecycle_manager_localization' in container '/nav2_container'
[component_container_isolated-1] [INFO] [1747224538.056538269] [lifecycle_manager_localization]: Creating and initializing lifecycle service clients
[component_container_isolated-1] [INFO] [1747224538.057436692] [nav2_container]: Load Library: /home/agx/nav2_ws/install/nav2_controller/lib/libcontroller_server_core.so
[component_container_isolated-1] [INFO] [1747224538.071887117] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_controller::ControllerServer>
[component_container_isolated-1] [INFO] [1747224538.071976044] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_controller::ControllerServer>
[component_container_isolated-1] [INFO] [1747224538.087189726] [lifecycle_manager_localization]: Starting managed nodes bringup...
[component_container_isolated-1] [INFO] [1747224538.087283613] [lifecycle_manager_localization]: Configuring map_server
[component_container_isolated-1] [INFO] [1747224538.087617402] [map_server]: Configuring
[component_container_isolated-1] [INFO] [1747224538.087746201] [map_io]: Loading yaml file: /home/agx/semantic_map_ws/install/bot_navigation2/share/bot_navigation2/maps/indoor_labelled.yaml
[component_container_isolated-1] [INFO] [1747224538.088744751] [map_io]: resolution: 0.05
[component_container_isolated-1] [INFO] [1747224538.088790319] [map_io]: origin[0]: -44.4
[component_container_isolated-1] [INFO] [1747224538.088801359] [map_io]: origin[1]: -50
[component_container_isolated-1] [INFO] [1747224538.088807951] [map_io]: origin[2]: 0
[component_container_isolated-1] [INFO] [1747224538.088813615] [map_io]: free_thresh: 0.25
[component_container_isolated-1] [INFO] [1747224538.088818702] [map_io]: occupied_thresh: 0.65
[component_container_isolated-1] [INFO] [1747224538.088827598] [map_io]: mode: trinary
[component_container_isolated-1] [INFO] [1747224538.088835342] [map_io]: negate: 0
[component_container_isolated-1] [INFO] [1747224538.094173052] [map_io]: Loading image_file: /home/agx/semantic_map_ws/install/bot_navigation2/share/bot_navigation2/maps/indoor.pgm
[component_container_isolated-1] [INFO] [1747224538.095581551] [controller_server]:
[component_container_isolated-1] controller_server lifecycle node launched.
[component_container_isolated-1] Waiting on external lifecycle transitions to activate
[component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[component_container_isolated-1] [INFO] [1747224538.126407759] [controller_server]: Creating controller server
[component_container_isolated-1] [INFO] [1747224538.146205525] [local_costmap.local_costmap]:
[component_container_isolated-1] local_costmap lifecycle node launched.
[component_container_isolated-1] Waiting on external lifecycle transitions to activate
[component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[component_container_isolated-1] [INFO] [1747224538.151738274] [local_costmap.local_costmap]: Creating Costmap
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/controller_server' in container '/nav2_container'
[component_container_isolated-1] [INFO] [1747224538.159312699] [nav2_container]: Load Library: /home/agx/nav2_ws/install/nav2_smoother/lib/libsmoother_server_core.so
[component_container_isolated-1] [INFO] [1747224538.166488856] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_smoother::SmootherServer>
[component_container_isolated-1] [INFO] [1747224538.166576695] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_smoother::SmootherServer>
[component_container_isolated-1] [INFO] [1747224538.186081696] [smoother_server]:
[component_container_isolated-1] smoother_server lifecycle node launched.
[component_container_isolated-1] Waiting on external lifecycle transitions to activate
[component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[component_container_isolated-1] [INFO] [1747224538.191682892] [smoother_server]: Creating smoother server
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/smoother_server' in container '/nav2_container'
[component_container_isolated-1] [INFO] [1747224538.197455926] [nav2_container]: Load Library: /home/agx/nav2_ws/install/nav2_planner/lib/libplanner_server_core.so
[component_container_isolated-1] [INFO] [1747224538.201347089] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_planner::PlannerServer>
[component_container_isolated-1] [INFO] [1747224538.201407857] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_planner::PlannerServer>
[component_container_isolated-1] [INFO] [1747224538.217642233] [planner_server]:
[component_container_isolated-1] planner_server lifecycle node launched.
[component_container_isolated-1] Waiting on external lifecycle transitions to activate
[component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[component_container_isolated-1] [INFO] [1747224538.223365731] [planner_server]: Creating
[component_container_isolated-1] [INFO] [1747224538.242474129] [global_costmap.global_costmap]:
[component_container_isolated-1] global_costmap lifecycle node launched.
[component_container_isolated-1] Waiting on external lifecycle transitions to activate
[component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[component_container_isolated-1] [INFO] [1747224538.244314815] [global_costmap.global_costmap]: Creating Costmap
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/planner_server' in container '/nav2_container'
[component_container_isolated-1] [INFO] [1747224538.254491968] [nav2_container]: Load Library: /home/agx/nav2_ws/install/nav2_behaviors/lib/libbehavior_server_core.so
[component_container_isolated-1] [INFO] [1747224538.268253279] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<behavior_server::BehaviorServer>
[component_container_isolated-1] [INFO] [1747224538.268321567] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<behavior_server::BehaviorServer>
[component_container_isolated-1] [INFO] [1747224538.284715461] [behavior_server]:
[component_container_isolated-1] behavior_server lifecycle node launched.
[component_container_isolated-1] Waiting on external lifecycle transitions to activate
[component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/behavior_server' in container '/nav2_container'
[component_container_isolated-1] [INFO] [1747224538.296269241] [nav2_container]: Load Library: /home/agx/nav2_ws/install/nav2_bt_navigator/lib/libbt_navigator_core.so
[component_container_isolated-1] [INFO] [1747224538.304106480] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_bt_navigator::BtNavigator>
[component_container_isolated-1] [INFO] [1747224538.304175119] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_bt_navigator::BtNavigator>
[component_container_isolated-1] [INFO] [1747224538.321664651] [bt_navigator]:
[component_container_isolated-1] bt_navigator lifecycle node launched.
[component_container_isolated-1] Waiting on external lifecycle transitions to activate
[component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[component_container_isolated-1] [INFO] [1747224538.321792426] [bt_navigator]: Creating
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/bt_navigator' in container '/nav2_container'
[component_container_isolated-1] [INFO] [1747224538.325634406] [nav2_container]: Load Library: /home/agx/nav2_ws/install/nav2_waypoint_follower/lib/libwaypoint_follower_core.so
[component_container_isolated-1] [INFO] [1747224538.328594635] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_waypoint_follower::WaypointFollower>
[component_container_isolated-1] [INFO] [1747224538.328644714] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_waypoint_follower::WaypointFollower>
[component_container_isolated-1] [INFO] [1747224538.344109561] [waypoint_follower]:
[component_container_isolated-1] waypoint_follower lifecycle node launched.
[component_container_isolated-1] Waiting on external lifecycle transitions to activate
[component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[component_container_isolated-1] [INFO] [1747224538.347691000] [waypoint_follower]: Creating
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/waypoint_follower' in container '/nav2_container'
[component_container_isolated-1] [INFO] [1747224538.352402988] [nav2_container]: Load Library: /home/agx/nav2_ws/install/nav2_velocity_smoother/lib/libvelocity_smoother_core.so
[component_container_isolated-1] [INFO] [1747224538.356282727] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_velocity_smoother::VelocitySmoother>
[component_container_isolated-1] [INFO] [1747224538.356422374] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_velocity_smoother::VelocitySmoother>
[component_container_isolated-1] [INFO] [1747224538.375497492] [velocity_smoother]:
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/velocity_smoother' in container '/nav2_container'
[component_container_isolated-1] velocity_smoother lifecycle node launched.
[component_container_isolated-1] Waiting on external lifecycle transitions to activate
[component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[component_container_isolated-1] [INFO] [1747224538.378981395] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_lifecycle_manager::LifecycleManager>
[component_container_isolated-1] [INFO] [1747224538.379051154] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_lifecycle_manager::LifecycleManager>
[component_container_isolated-1] [INFO] [1747224538.393011536] [lifecycle_manager_navigation]: Creating
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/lifecycle_manager_navigation' in container '/nav2_container'
[component_container_isolated-1] [INFO] [1747224538.397875298] [lifecycle_manager_navigation]: Creating and initializing lifecycle service clients
[component_container_isolated-1] [INFO] [1747224538.401186307] [map_io]: Read map /home/agx/semantic_map_ws/install/bot_navigation2/share/bot_navigation2/maps/indoor.pgm: 1531 X 1510 map @ 0.05 m/cell
[component_container_isolated-1] [INFO] [1747224538.415737531] [lifecycle_manager_localization]: Configuring amcl
[component_container_isolated-1] [INFO] [1747224538.415991641] [amcl]: Configuring
[component_container_isolated-1] [INFO] [1747224538.416156727] [amcl]: initTransforms
[component_container_isolated-1] [INFO] [1747224538.444377231] [amcl]: initPubSub
[component_container_isolated-1] [INFO] [1747224538.449217474] [lifecycle_manager_navigation]: Starting managed nodes bringup...
[component_container_isolated-1] [INFO] [1747224538.449367520] [lifecycle_manager_navigation]: Configuring controller_server
[component_container_isolated-1] [INFO] [1747224538.449921755] [controller_server]: Configuring controller interface
[component_container_isolated-1] [INFO] [1747224538.450360087] [controller_server]: getting goal checker plugins..
[component_container_isolated-1] [INFO] [1747224538.450577941] [controller_server]: Controller frequency set to 20.0000Hz
[component_container_isolated-1] [INFO] [1747224538.450642740] [local_costmap.local_costmap]: Configuring
[component_container_isolated-1] [INFO] [1747224538.458376652] [amcl]: Subscribed to map topic.
[component_container_isolated-1] [INFO] [1747224538.460541560] [local_costmap.local_costmap]: Using plugin "static_layer"
[component_container_isolated-1] [INFO] [1747224538.477393658] [local_costmap.local_costmap]: Subscribing to the map topic (/map) with transient local durability
[component_container_isolated-1] [INFO] [1747224538.482347596] [local_costmap.local_costmap]: Initialized plugin "static_layer"
[component_container_isolated-1] [INFO] [1747224538.482412875] [local_costmap.local_costmap]: Using plugin "obstacle_layer"
[component_container_isolated-1] [INFO] [1747224538.484549463] [lifecycle_manager_localization]: Activating map_server
[component_container_isolated-1] [INFO] [1747224538.484803733] [map_server]: Activating
[component_container_isolated-1] [INFO] [1747224538.485179761] [local_costmap.local_costmap]: Subscribed to Topics: scan
[component_container_isolated-1] [INFO] [1747224538.486572388] [map_server]: Creating bond (map_server) to lifecycle manager.
[component_container_isolated-1] malloc(): invalid size (unsorted)
[component_container_isolated-1] Magick: abort due to signal 6 (SIGABRT) "Abort"...
[rviz2-2] [INFO] [1747224538.742160396] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-2] [INFO] [1747224538.742477769] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rviz2-2] [INFO] [1747224538.824175565] [rviz2]: Stereo is NOT SUPPORTED
[ERROR] [component_container_isolated-1]: process has died [pid 7792, exit code -6, cmd '/opt/ros/humble/lib/rclcpp_components/component_container_isolated --ros-args --log-level info --ros-args -r __node:=nav2_container --params-file /tmp/launch_params_02dgqwm7 --params-file /tmp/launch_params_tcc1vpuj -r /tf:=tf -r /tf_static:=tf_static'].
[rviz2-2] [INFO] [1747224539.960257189] [rviz2]: Message Filter dropping message: frame 'laser' at time 1747224539.063 for reason 'discarding message because the queue is full'
[rviz2-2] [INFO] [1747224540.055364491] [rviz2]: Message Filter dropping message: frame 'laser' at time 1747224539.150 for reason 'discarding message because the queue is full'
[rviz2-2] [INFO] [1747224540.119518419] [rviz2]: Message Filter dropping message: frame 'laser' at time 1747224539.230 for reason 'discarding message because the queue is full'
[rviz2-2] [INFO] [1747224540.215937772] [rviz2]: Message Filter dropping message: frame 'laser' at time 1747224539.310 for reason 'discarding message because the queue is full'
[rviz2-2] [INFO] [1747224540.279572121] [rviz2]: Message Filter dropping message: frame 'laser' at time 1747224539.390 for reason 'discarding message because the queue is full'
[rviz2-2] [INFO] [1747224540.375857876] [rviz2]: Message Filter dropping message: frame 'laser' at time 1747224539.469 for reason 'discarding message because the queue is full'
[rviz2-2] [INFO] [1747224540.439654143] [rviz2]: Message Filter dropping message: frame 'laser' at time 1747224539.555 for reason 'discarding message because the queue is full'
TF树如下:
a7556c33-0e45-4740-ba9b-b19930cc832d-image.png
节点话题关系如下:
af370d86-a40f-4dfa-abfa-903eda274481-image.png
我在使用键盘控制节点的时候,按键盘的i车向前走,然后我又按j建,但是这个时候车还是向前走,电机的布局就是你们教程中的那样
编译的时候报错信息如下
CMake Error at flow/CMakeLists.txt:17 (target_link_libraries): Error evaluating generator expression: $<TARGET_PROPERTY:fastcdr,TYPE> Target "fastcdr" not found.感觉和dds相关,有人遇到过吗
按照教程一步步操作了,也在社区看了很多帖子,依然没有什么头绪,不得已请假下各位大佬们
环境 2驱差速fishbot,EAI S2 雷达 树莓派4b 、ubuntu22.04桌面版、ros2 humb git clone 源码编译 ydlidar_ros2 已做的工作1、按照教程,使用工具给雷达板刷好了固件
489b8f8c-c578-4523-8661-0b51307ccf3d-image.png
2、雷达转接板在刷好固件后,跳线帽切换了USB模式,并使用串口助手,验证了雷达转接板在115200波特率下,有二进制数据不断输出
8e2c0134-79a5-4c4e-abd1-57166c35d96b-image.png
3、确认插上串口后,驱动正常,并修改yml配置文件为下面设备 /dev/ttyUSB0
52709014-09be-4a46-8924-01b302373bc9-image.png
8af014ed-afbd-41ab-afd8-5044382afa68-image.png
4、正确编译了雷达驱动并sudo chmod 666 /dev/ttyUSB0 给予了权限,执行ros2 launch ydlidar ydlidar_launch.py 失败,信息如下
7805a94c-73e2-4a3f-90ba-031174c8ea3e-image.png
5、重试,插拔串口、反复操作,成功了一次,过十秒左右但是又开始报错
6bc31183-9357-4365-b1bc-66c36d845b1c-image.png
此时的topic
3426d3c7-0f6e-4299-aea2-2e42f9e9ad99-image.png
6、启动rviz2 ,配置好后也没有任何反应,画面里无雷达数据
6b5ac07e-fef5-4d10-a969-10fa4b2d3d3b-image.png
由于wifi的方式也试过了,也是这个问题,于是使用了usb串口直连,排除网络问题,仍然这样子
每次启动后一会儿就报错,rviz2无任何数据显示
[ydlidar_node-1] [ERROR] [1747213588.454829551] [ydlidar_node]: Failed to get scan
由于使用树莓派,无法使用docker启动雷达建图案例,特此求助各位大佬。
进行第二轮尝试使用树莓派无果,进行第二种方案尝试
window11下在笔记本 Vmware 安装虚拟机ubuntu22.04 1、USB串口直连已确保usb被正常扫描出来了,板子跳线帽插在了EN、USBT、USBR
c1ac05bb-7e6a-49ca-b334-f571532f3fcd-image.png
使用github的v1.0.0/fishbot雷达驱动,编辑了配置重新编译过
90baaffc-f814-42dd-9646-59fbbb8c82c2-image.png
启动后,几秒钟开始报错
34266f09-3f84-4d7d-8467-b923ef20171c-image.png
新开一个终端查看topic
ff665e1c-03ef-4bb5-9886-8a9f195465ec-image.png
rviz2配置完成无数据显示。。。
2、使用docker 走 WIFI 网络连接配置虚拟机NAT模式端口映射 TCP+UDP (8889 -> 8889、8888 -> 8888),并使用同一局域网下的设备测试telnet能够连接到虚拟机内docker启动的8889端口
雷达板跳线帽插到WIFI模式
d8689232-e9f2-4453-b1a3-27220a31097e-image.png
此时雷达板显示
1334c811-907e-4c01-990b-8dd6046c13a6-1065568140ffd544914fc8b31c68cf3.jpg
编写了python脚本在8889端口开启tcp服务器,能检测到雷达板自动连接上来
dc67fabc-0db9-4479-a137-cdc27755f1d4-image.png
经过多轮尝试,没有走通雷达显示数据和建图,不知道问题出在哪里,希望大佬给予指引,感激不尽!
代码清单 2-19
我的电脑colcon build 编译后生成的install/是setup.sh没有.bash结尾的文件,这两个文件有什么 区别吗?
我source install/setup.sh没有报错,但是ros2 run demo_python_pkg python_node还是找不到包。然后echo环境变量的路径,也没有导入我当前的路径。
ros2 run demo_python_topic novel_pub_node 命令输入后报错
错误信息:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 700, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 383, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1017, in validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 411, in connect
self.sock = ssl_wrap_socket(
File "/usr/lib/python3/dist-packages/urllib3/util/ssl.py", line 453, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls)
File "/usr/lib/python3/dist-packages/urllib3/util/ssl.py", line 495, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock)
File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket
return self.sslsocket_class._create(
File "/usr/lib/python3.10/ssl.py", line 1100, in _create
self.do_handshake()
File "/usr/lib/python3.10/ssl.py", line 1371, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1007)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 756, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 576, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='0.0.0.0', port=8000): Max retries exceeded with url: /novel1.txt (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1007)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/cxy/chapt3/topic_ws/install/demo_python_topic/lib/demo_python_topic/novel_pub_node", line 33, in <module>
sys.exit(load_entry_point('demo-python-topic==0.0.0', 'console_scripts', 'novel_pub_node')())
File "/home/cxy/chapt3/topic_ws/install/demo_python_topic/lib/python3.10/site-packages/demo_python_topic/novel_pub_node.py", line 32, in main
node.download_novel('https://0.0.0.0:8000/novel1.txt')
File "/home/cxy/chapt3/topic_ws/install/demo_python_topic/lib/python3.10/site-packages/demo_python_topic/novel_pub_node.py", line 16, in download_novel
response = requests.get(url)
File "/usr/lib/python3/dist-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 544, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 657, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='0.0.0.0', port=8000): Max retries exceeded with url: /novel1.txt (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1007)')))
[ros2run]: Process exited with failure 1
5be95947-1f38-49a1-a63d-a04e4073fa66-image.png
这一步之后怎么继续获取roscore呢
截图 2025-05-13 20-04-28.png 截图 2025-05-13 20-02-02.png
版块
-
1.3k
主题4.8k
帖子 -
419
主题2.8k
帖子 -
39
主题167
帖子 -
1.0k
主题4.2k
帖子 -
975
主题3.6k
帖子 -
5
主题11
帖子 -
353
主题1.6k
帖子