@320562846 运行一下source /usr/share/gazebo/setup.bash,找到安装路径的这个文件source一下再运行就行
文件.wslconfig如下图,网络连接模式是镜像模式
f248d55b-ef63-4726-b451-21e16c7953fb-image.png
talker运行结果如下图
8a4f28b0-f748-46c7-a191-076bcd87ed23-image.png
listener运行结果如下
423d1943-aa26-4680-be8f-f0f95f503725-image.png
6.2.2运行显示display_robot.launch.py报错[ERROR] [launch]: Caught exception in launch (see debug for traceback): 'ParameterValue' object has no attribute 'describe_sub_entities'
0fd0c1bc-d368-4fa3-8cf0-986b1e0a3bf5-图片.png
debug log:
dw@dw:~/codes/chapt6/chapt6_ws/src/fishbot_description/launch$ ros2 launch fishbot_description display_robot.launch.py --debug
[DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.IncludeLaunchDescription'
[INFO] [launch]: All log files can be found below /home/dw/.ros/log/2025-05-06-11-43-05-130647-dw-11442
[INFO] [launch]: Default logging verbosity is set to DEBUG
[DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x7cd550b06560>'
[DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x7cd550b06560>' ✓ '<launch.event_handlers.on_include_launch_description.OnIncludeLaunchDescription object at 0x7cd550dcd6c0>'
[DEBUG] [launch]: An exception was raised in an async action/event
[DEBUG] [launch]: Traceback (most recent call last):
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_service.py", line 336, in run_async
raise completed_tasks_exceptions[0]
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_service.py", line 230, in _process_one_event
await self.__process_event(next_event)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_service.py", line 250, in __process_event
visit_all_entities_and_collect_futures(entity, self.__context))
File "/opt/ros/humble/lib/python3.10/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 38, in visit_all_entities_and_collect_futures
sub_entities = entity.visit(context)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/action.py", line 108, in visit
return self.execute(context)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/actions/include_launch_description.py", line 164, in execute
launch_description.get_launch_arguments_with_include_launch_description_actions())
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_description.py", line 161, in get_launch_arguments_with_include_launch_description_actions
process_entities(self.entities, _conditional_inclusion=conditional_inclusion)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_description.py", line 152, in process_entities
entity.describe_sub_entities(),
AttributeError: 'ParameterValue' object has no attribute 'describe_sub_entities'
[ERROR] [launch]: Caught exception in launch (see debug for traceback): 'ParameterValue' object has no attribute 'describe_sub_entities'
[DEBUG] [launch.launch_context]: emitting event: 'launch.events.Shutdown'
[DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x7cd550dcd5a0>'
[DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x7cd550dcd5a0>' ✓ '<launch.event_handlers.on_shutdown.OnShutdown object at 0x7cd550b07a00>'
从网上没搜到相关问题及解决方案,deepseek更改代码如下:
import launch
import launch_ros
from ament_index_python.packages import get_package_share_directory
import launch_ros.parameter_descriptions
def generate_launch_description():
urdf_tutorial_path = get_package_share_directory('fishbot_description')
default_model_path = urdf_tutorial_path + '/urdf/first_robot.urdf'
这段代码与书上的主要不同之处是把action_declare_arg_mode_path中default_value参数去掉str()
cooneo@cooneo:~/catkin_ws$ roslaunch nav_slam nav_slam.launch
... logging to /home/cooneo/.ros/log/2fb4aa40-2a1f-11f0-acbc-dca632e39caf/roslaunch-cooneo-28683.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://192.168.0.153:41293/
SUMMARYCLEAR PARAMETERS
/move_base/PARAMETERS
/amcl/base_frame_id: base_footprint /amcl/global_frame_id: map /amcl/gui_publish_rate: 10.0 /amcl/kld_err: 0.05 /amcl/kld_z: 0.99 /amcl/laser_lambda_short: 0.1 /amcl/laser_likelihood_max_dist: 2.0 /amcl/laser_max_beams: 30 /amcl/laser_model_type: likelihood_field /amcl/laser_sigma_hit: 0.2 /amcl/laser_z_hit: 0.5 /amcl/laser_z_max: 0.05 /amcl/laser_z_rand: 0.5 /amcl/laser_z_short: 0.05 /amcl/max_particles: 5000 /amcl/min_particles: 500 /amcl/odom_alpha1: 0.2 /amcl/odom_alpha2: 0.2 /amcl/odom_alpha3: 0.8 /amcl/odom_alpha4: 0.2 /amcl/odom_alpha5: 0.1 /amcl/odom_frame_id: odom /amcl/odom_model_type: diff /amcl/transform_tolerance: 0.2 /amcl/update_min_a: 0.5 /amcl/update_min_d: 0.2 /move_base/TrajectoryPlannerROS/acc_lim_theta: 0.6 /move_base/TrajectoryPlannerROS/acc_lim_x: 1.0 /move_base/TrajectoryPlannerROS/acc_lim_y: 0.0 /move_base/TrajectoryPlannerROS/holonomic_robot: False /move_base/TrajectoryPlannerROS/max_vel_theta: 1.0 /move_base/TrajectoryPlannerROS/max_vel_x: 0.5 /move_base/TrajectoryPlannerROS/min_in_place_vel_theta: 1.0 /move_base/TrajectoryPlannerROS/min_vel_theta: -1.0 /move_base/TrajectoryPlannerROS/min_vel_x: 0.1 /move_base/TrajectoryPlannerROS/sim_granularity: 0.05 /move_base/TrajectoryPlannerROS/sim_time: 0.8 /move_base/TrajectoryPlannerROS/vtheta_samples: 20 /move_base/TrajectoryPlannerROS/vx_samples: 18 /move_base/TrajectoryPlannerROS/xy_goal_tolerance: 0.1 /move_base/TrajectoryPlannerROS/yaw_goal_tolerance: 0.05 /move_base/global_costmap/cost_scaling_factor: 3.0 /move_base/global_costmap/global_frame: map /move_base/global_costmap/inflation_radius: 0.2 /move_base/global_costmap/map_type: costmap /move_base/global_costmap/observation_sources: scan /move_base/global_costmap/obstacle_range: 3.0 /move_base/global_costmap/publish_frequency: 1.0 /move_base/global_costmap/raytrace_range: 3.5 /move_base/global_costmap/robot_base_frame: base_footprint /move_base/global_costmap/robot_radius: 0.12 /move_base/global_costmap/scan/clearing: True /move_base/global_costmap/scan/data_type: LaserScan /move_base/global_costmap/scan/marking: True /move_base/global_costmap/scan/sensor_frame: laser /move_base/global_costmap/scan/topic: scan /move_base/global_costmap/static_map: True /move_base/global_costmap/transform_tolerance: 0.5 /move_base/global_costmap/update_frequency: 1.0 /move_base/local_costmap/cost_scaling_factor: 3.0 /move_base/local_costmap/global_frame: odom /move_base/local_costmap/height: 3 /move_base/local_costmap/inflation_radius: 0.2 /move_base/local_costmap/map_type: costmap /move_base/local_costmap/observation_sources: scan /move_base/local_costmap/obstacle_range: 3.0 /move_base/local_costmap/publish_frequency: 10.0 /move_base/local_costmap/raytrace_range: 3.5 /move_base/local_costmap/resolution: 0.05 /move_base/local_costmap/robot_base_frame: base_footprint /move_base/local_costmap/robot_radius: 0.12 /move_base/local_costmap/rolling_window: True /move_base/local_costmap/scan/clearing: True /move_base/local_costmap/scan/data_type: LaserScan /move_base/local_costmap/scan/marking: True /move_base/local_costmap/scan/sensor_frame: laser /move_base/local_costmap/scan/topic: scan /move_base/local_costmap/static_map: False /move_base/local_costmap/transform_tolerance: 1.0 /move_base/local_costmap/update_frequency: 10.0 /move_base/local_costmap/width: 3 /rosdistro: melodic /rosversion: 1.14.13NODES
/
amcl (amcl/amcl)
map_server (map_server/map_server)
move_base (move_base/move_base)
ROS_MASTER_URI=http://192.168.0.153:11311
process[map_server-1]: started with pid [29149]
process[amcl-2]: started with pid [29150]
process[move_base-3]: started with pid [29152]
[ INFO] [1746497412.106544390]: Requesting the map...
[ WARN] [1746497412.110909306]: Request for map failed; trying again...
[ WARN] [1746497412.612591842]: Request for map failed; trying again...
[ WARN] [1746497413.114413875]: Request for map failed; trying again...
[ WARN] [1746497413.615940977]: Request for map failed; trying again...
[ WARN] [1746497414.117424610]: Request for map failed; trying again...
[ INFO] [1746497414.684970140]: Received a 1984 X 1984 map @ 0.050 m/pix
[ INFO] [1746497415.102103451]: Initializing likelihood field model; this can take some time on large maps...
[ INFO] [1746497415.453039350]: Done initializing likelihood field model.
[ WARN] [1746497415.718526470]: global_costmap: Parameter "plugins" not provided, loading pre-Hydro parameters
[ INFO] [1746497415.784228117]: global_costmap: Using plugin "static_layer"
[ INFO] [1746497415.852520275]: Requesting the map...
[ INFO] [1746497416.083940712]: Resizing costmap to 1984 X 1984 at 0.050000 m/pix
[ INFO] [1746497416.162248389]: Received a 1984 X 1984 map at 0.050000 m/pix
[ INFO] [1746497416.187822907]: global_costmap: Using plugin "obstacle_layer"
[ INFO] [1746497416.210287478]: Subscribed to Topics: scan
[ INFO] [1746497416.257389235]: global_costmap: Using plugin "inflation_layer"
[ WARN] [1746497416.732874443]: local_costmap: Parameter "plugins" not provided, loading pre-Hydro parameters
[ INFO] [1746497416.781833401]: local_costmap: Using plugin "obstacle_layer"
[ INFO] [1746497416.792463268]: Subscribed to Topics: scan
[ INFO] [1746497416.838073200]: local_costmap: Using plugin "inflation_layer"
[ INFO] [1746497417.685828974]: Created local_planner base_local_planner/TrajectoryPlannerROS
[ INFO] [1746497417.704228209]: Sim period is set to 0.05
[ WARN] [1746497417.720670628]: Trajectory Rollout planner initialized with param meter_scoring not set. Set it to true to make your settings robust against changes of costmap resolution.
[ INFO] [1746497417.937169600]: Recovery behavior will clear layer 'obstacles'
[ INFO] [1746497417.964736543]: Recovery behavior will clear layer 'obstacles'
[ INFO] [1746497418.047924455]: odom received!
[ WARN] [1746498260.262650638]: Costmap2DROS transform timeout. Current time: 1746498260.2475, global_pose stamp: 1746498259.7060, tolerance: 0.5000
[ WARN] [1746498260.267267042]: Could not get robot pose, cancelling reconfiguration
[ WARN] [1746498269.775144485]: Could not get robot pose, cancelling reconfiguration
[ERROR] [1746498270.848120121]: Extrapolation Error looking up robot pose: Lookup would require extrapolation into the past. Requested time 1746498259.705988196 but the earliest data is at time 1746498260.849833965, when looking up transform from frame [base_footprint] to frame [map]
会出现上述的报错,这是完整的运行结果。tf树完整,不知道原因出在哪里,希望有大佬能够帮助小白。下位机使用的arduino mega2560 rosarduinobridge包为python2版本
raceback (most recent call last):
File "/tmp/fishinstall/install.py", line 134, in <module>
main()File "/tmp/fishinstall/install.py", line 123, in main
run_tool_file(tools[code]['tool'].replace("/","."))File "/tmp/fishinstall/tools/base.py", line 1473, in run_tool_file
tool = importlib.import_module(file.replace(".py","")).Tool()AttributeError: module 'tools.tool_config_system_source' has no attribute 'Tool'
我使用的是arduino mega 2560的板子为下位机上位机位为树莓派,启动路径规划时tf树完整,使用rosrun tf tf_monitor时,出现里程计时间戳为负。ai说的可能导致路径规划失败。arduino的程序波特率我设置的57600,用的是python2版本的。不知道有没有好心的大佬帮忙解答的,本人做的是毕业设计。希望各位好心的大佬能够帮帮孩子。
我的环境是Ubuntu24.04的ros2的jazzy版本
我在按照moveit2给的教程一步一步运行时,在示例中的与新机器人集成的moveit设置助手中,设置robot pose时闪退,请问有没有大佬知道是什么原因?
我搜了一下说是moveit_setup_assistant 程序崩溃了,崩溃原因是 moveit::core::RobotState::getCollisionBodyTransform 函数里的断言 checkCollisionTransforms() 失败,请教一下有没有什么解决办法?
moveit.core.robot_model]: No root/virtual joint specified in SRDF. Assuming fixed joint
[moveit_setup_assistant-1] Error: Virtual joint does not attach to a link on the robot (link '' is not known)
[moveit_setup_assistant-1] at line 104 in ./src/model.cpp
[moveit_setup_assistant-1] [INFO] [1746411226.290223960] [moveit_3648284124.moveit.core.robot_model]: Loading robot model 'panda'...
[moveit_setup_assistant-1] [INFO] [1746411226.290290451] [moveit_3648284124.moveit.core.robot_model]: No root/virtual joint specified in SRDF. Assuming fixed joint
[moveit_setup_assistant-1] [INFO] [1746411226.301623446] [moveit_3648284124.moveit.core.robot_model]: Loading robot model 'panda'...
[moveit_setup_assistant-1] [INFO] [1746411226.315506811] [moveit_3648284124.moveit.ros.rdf_loader]: Loaded robot model in 0.00213362 seconds
[moveit_setup_assistant-1] [INFO] [1746411226.315543618] [moveit_3648284124.moveit.core.robot_model]: Loading robot model 'panda'...
[moveit_setup_assistant-1] [INFO] [1746411226.315557866] [moveit_3648284124.moveit.core.robot_model]: No root/virtual joint specified in SRDF. Assuming fixed joint
[moveit_setup_assistant-1] Warning: Group 'panda_arm' is empty.
[moveit_setup_assistant-1] at line 262 in ./src/model.cpp
[moveit_setup_assistant-1] [INFO] [1746411240.082504367] [moveit_3648284124.moveit.core.robot_model]: Loading robot model 'panda'...
[moveit_setup_assistant-1] [WARN] [1746411240.093801741] [moveit_3648284124.moveit.core.robot_model]: Group 'panda_arm' must have at least one valid joint
[moveit_setup_assistant-1] [WARN] [1746411240.093825487] [moveit_3648284124.moveit.core.robot_model]: Failed to add group 'panda_arm'
[moveit_setup_assistant-1] [INFO] [1746411248.739835954] [moveit_3648284124.moveit.core.robot_model]: Loading robot model 'panda'...
[moveit_setup_assistant-1] Warning: Group 'hand' is empty.
[moveit_setup_assistant-1] at line 262 in ./src/model.cpp
[moveit_setup_assistant-1] [INFO] [1746411253.859376020] [moveit_3648284124.moveit.core.robot_model]: Loading robot model 'panda'...
[moveit_setup_assistant-1] [WARN] [1746411253.870377748] [moveit_3648284124.moveit.core.robot_model]: Group 'hand' must have at least one valid joint
[moveit_setup_assistant-1] [WARN] [1746411253.870402681] [moveit_3648284124.moveit.core.robot_model]: Failed to add group 'hand'
[moveit_setup_assistant-1] [INFO] [1746411256.657937157] [moveit_3648284124.moveit.core.robot_model]: Loading robot model 'panda'...
[moveit_setup_assistant-1] [INFO] [1746411360.736098454] [moveit_3648284124.moveit.core.robot_model]: Loading robot model 'panda'...
[moveit_setup_assistant-1] [WARN] [1746411373.492043737] [moveit_3648284124.moveit.core.robot_state]: Returning dirty collision body transforms
[moveit_setup_assistant-1] moveit_setup_assistant: /home/ls/ws_moveit/src/moveit2/moveit_core/robot_state/include/moveit/robot_state/robot_state.hpp:1305: const Isometry3d& moveit::core::RobotState::getCollisionBodyTransform(const moveit::core::LinkModel*, std::size_t) const: 断言 "checkCollisionTransforms()" 失败。
[moveit_setup_assistant-1] Stack trace (most recent call last):
[moveit_setup_assistant-1] #31 Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.13", at 0x77b2f3ad8117, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
[moveit_setup_assistant-1] #30 Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.13", at 0x77b2f476bd44, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
[moveit_setup_assistant-1] #29 Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.13", at 0x77b2f47cdfbe, in
[moveit_setup_assistant-1] #28 Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.13", at 0x77b2f47caa38, in
[moveit_setup_assistant-1] #27 Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.13", at 0x77b2f4772873, in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool)
[moveit_setup_assistant-1] #26 Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.13", at 0x77b2f3ad8117, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
[moveit_setup_assistant-1] #25 Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.13", at 0x77b2f47746af, in QApplication::notify(QObject*, QEvent*)
[moveit_setup_assistant-1] #24 Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.13", at 0x77b2f476bd44, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
[moveit_setup_assistant-1] #23 Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.13", at 0x77b2f47b0df7, in QWidget::event(QEvent*)
[moveit_setup_assistant-1] #22 Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.13", at 0x77b2f492071a, in QSlider::mouseMoveEvent(QMouseEvent*)
[moveit_setup_assistant-1] #21 Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.13", at 0x77b2f486b8e2, in QAbstractSlider::setValue(int)
[moveit_setup_assistant-1] #20 Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.13", at 0x77b2f486b0ef, in QAbstractSlider::valueChanged(int)
[moveit_setup_assistant-1] #19 Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.13", at 0x77b2f3b12dbe, in
[moveit_setup_assistant-1] #18 Source "/home/ls/ws_moveit/build/moveit_setup_srdf_plugins/include/moveit_setup_srdf_plugins/moc_robot_poses_widget.cpp", line 247, in qt_static_metacall [0x77b2c2d8e818]
[moveit_setup_assistant-1] 244: (void)t;
[moveit_setup_assistant-1] 245: switch (id) {
[moveit_setup_assistant-1] 246: case 0: t->jointValueChanged((reinterpret_cast< const std::string()>(a[1])),(reinterpret_cast< double()>(a[2]))); break;
[moveit_setup_assistant-1] > 247: case 1: t->changeJointValue((reinterpret_cast< int()>(a[1]))); break;
[moveit_setup_assistant-1] 248: case 2: t->changeJointSlider(); break;
[moveit_setup_assistant-1] 249: default: ;
[moveit_setup_assistant-1] 250: }
[moveit_setup_assistant-1] #17 Source "/home/ls/ws_moveit/src/moveit2/moveit_setup_assistant/moveit_setup_srdf_plugins/src/robot_poses_widget.cpp", line 790, in changeJointValue [0x77b2c2d7ed87]
[moveit_setup_assistant-1] 787: joint_value->setText(QString("%1").arg(double_value, 0, 'f', 4));
[moveit_setup_assistant-1] 788:
[moveit_setup_assistant-1] 789: // Send event to parent widget
[moveit_setup_assistant-1] > 790: Q_EMIT jointValueChanged(joint_model->getName(), double_value);
[moveit_setup_assistant-1] 791: }
[moveit_setup_assistant-1] 792:
[moveit_setup_assistant-1] 793: // ******************************************************************************************
[moveit_setup_assistant-1] #16 Source "/home/ls/ws_moveit/build/moveit_setup_srdf_plugins/include/moveit_setup_srdf_plugins/moc_robot_poses_widget.cpp", line 318, in jointValueChanged [0x77b2c2d8eaa8]
[moveit_setup_assistant-1] 315: void moveit_setup::srdf_setup::SliderWidget::jointValueChanged(const std::string & t1, double t2)
[moveit_setup_assistant-1] 316: {
[moveit_setup_assistant-1] 317: void _a[] = { nullptr, const_cast<void>(reinterpret_cast<const void*>(std::addressof(t1))), const_cast<void*>(reinterpret_cast<const void*>(std::addressof(t2))) };
[moveit_setup_assistant-1] > 318: QMetaObject::activate(this, &staticMetaObject, 0, a);
[moveit_setup_assistant-1] 319: }
[moveit_setup_assistant-1] 320: QT_WARNING_POP
[moveit_setup_assistant-1] 321: QT_END_MOC_NAMESPACE
[moveit_setup_assistant-1] #15 Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.13", at 0x77b2f3b12dbe, in
[moveit_setup_assistant-1] #14 Source "/home/ls/ws_moveit/build/moveit_setup_srdf_plugins/include/moveit_setup_srdf_plugins/moc_robot_poses_widget.cpp", line 127, in qt_static_metacall [0x77b2c2d8e5f3]
[moveit_setup_assistant-1] 124: case 7: t->loadJointSliders((reinterpret_cast< const QString()>(a[1]))); break;
[moveit_setup_assistant-1] 125: case 8: t->showDefaultPose(); break;
[moveit_setup_assistant-1] 126: case 9: t->playPoses(); break;
[moveit_setup_assistant-1] > 127: case 10: t->updateRobotModel((reinterpret_cast< const std::string()>(a[1])),(reinterpret_cast< double()>(a[2]))); break;
[moveit_setup_assistant-1] 128: default: ;
[moveit_setup_assistant-1] 129: }
[moveit_setup_assistant-1] 130: } else if (c == QMetaObject::RegisterMethodArgumentMetaType) {
[moveit_setup_assistant-1] #13 Source "/home/ls/ws_moveit/src/moveit2/moveit_setup_assistant/moveit_setup_srdf_plugins/src/robot_poses_widget.cpp", line 687, in updateRobotModel [0x77b2c2d7e3bd]
[moveit_setup_assistant-1] 684: robot_state.setVariablePosition(name, value);
[moveit_setup_assistant-1] 685:
[moveit_setup_assistant-1] 686: // Update the robot model/rviz
[moveit_setup_assistant-1] > 687: updateStateAndCollision(robot_state);
[moveit_setup_assistant-1] 688: }
[moveit_setup_assistant-1] 689:
[moveit_setup_assistant-1] 690: void RobotPosesWidget::updateStateAndCollision(const moveit::core::RobotState& robot_state)
[moveit_setup_assistant-1] #12 Source "/home/ls/ws_moveit/src/moveit2/moveit_setup_assistant/moveit_setup_srdf_plugins/src/robot_poses_widget.cpp", line 696, in updateStateAndCollision [0x77b2c2d7e418]
[moveit_setup_assistant-1] 694: // if in collision, show warning
[moveit_setup_assistant-1] 695: // if no collision, hide warning
[moveit_setup_assistant-1] > 696: collision_warning->setHidden(!setup_step.checkSelfCollision(robot_state));
[moveit_setup_assistant-1] 697: }
[moveit_setup_assistant-1] 698:
[moveit_setup_assistant-1] 699: // ******************************************************************************************
[moveit_setup_assistant-1] #11 Source "/home/ls/ws_moveit/src/moveit2/moveit_setup_assistant/moveit_setup_srdf_plugins/src/robot_poses.cpp", line 115, in checkSelfCollision [0x77b2c2d4c57a]
[moveit_setup_assistant-1] 112: {
[moveit_setup_assistant-1] 113: // Decide if current state is in collision
[moveit_setup_assistant-1] 114: collision_detection::CollisionResult result;
[moveit_setup_assistant-1] > 115: srdf_config->getPlanningScene()->checkSelfCollision(request, result, robot_state, allowed_collision_matrix);
[moveit_setup_assistant-1] 116: return !result.contacts.empty();
[moveit_setup_assistant-1] 117: }
[moveit_setup_assistant-1] #10 Source "/home/ls/ws_moveit/src/moveit2/moveit_core/planning_scene/src/planning_scene.cpp", line 559, in checkSelfCollision [0x77b2f25f7cf5]
[moveit_setup_assistant-1] 556: const collision_detection::AllowedCollisionMatrix& acm) const
[moveit_setup_assistant-1] 557: {
[moveit_setup_assistant-1] 558: req.pad_self_collisions ? getCollisionEnv()->checkSelfCollision(req, res, robot_state, acm) :
[moveit_setup_assistant-1] > 559: getCollisionEnvUnpadded()->checkSelfCollision(req, res, robot_state, acm);
[moveit_setup_assistant-1] 560: }
[moveit_setup_assistant-1] 561:
[moveit_setup_assistant-1] 562: void PlanningScene::getCollidingPairs(collision_detection::CollisionResult::ContactMap& contacts)
[moveit_setup_assistant-1] #9 Source "/home/ls/ws_moveit/src/moveit2/moveit_core/collision_detection_fcl/src/collision_env_fcl.cpp", line 271, in checkSelfCollision [0x77b2eefc45b6]
[moveit_setup_assistant-1] 268: void CollisionEnvFCL::checkSelfCollision(const CollisionRequest& req, CollisionResult& res,
[moveit_setup_assistant-1] 269: const moveit::core::RobotState& state, const AllowedCollisionMatrix& acm) const
[moveit_setup_assistant-1] 270: {
[moveit_setup_assistant-1] > 271: checkSelfCollisionHelper(req, res, state, &acm);
[moveit_setup_assistant-1] 272: }
[moveit_setup_assistant-1] 273:
[moveit_setup_assistant-1] 274: void CollisionEnvFCL::checkSelfCollisionHelper(const CollisionRequest& req, CollisionResult& res,
[moveit_setup_assistant-1] #8 Source "/home/ls/ws_moveit/src/moveit2/moveit_core/collision_detection_fcl/src/collision_env_fcl.cpp", line 279, in checkSelfCollisionHelper [0x77b2eefc462a]
[moveit_setup_assistant-1] 276: const AllowedCollisionMatrix* acm) const
[moveit_setup_assistant-1] 277: {
[moveit_setup_assistant-1] 278: FCLManager manager;
[moveit_setup_assistant-1] > 279: allocSelfCollisionBroadPhase(state, manager);
[moveit_setup_assistant-1] 280: CollisionData cd(&req, &res, acm);
[moveit_setup_assistant-1] 281: cd.enableGroup(getRobotModel());
[moveit_setup_assistant-1] 282: manager.manager->collide(&cd, &collisionCallback);
[moveit_setup_assistant-1] #7 Source "/home/ls/ws_moveit/src/moveit2/moveit_core/collision_detection_fcl/src/collision_env_fcl.cpp", line 258, in allocSelfCollisionBroadPhase [0x77b2eefc44df]
[moveit_setup_assistant-1] 255: {
[moveit_setup_assistant-1] 256: manager.manager = std::make_uniquefcl::DynamicAABBTreeCollisionManagerd();
[moveit_setup_assistant-1] 257:
[moveit_setup_assistant-1] > 258: constructFCLObjectRobot(state, manager.object);
[moveit_setup_assistant-1] 259: manager.object.registerTo(manager.manager.get());
[moveit_setup_assistant-1] 260: }
[moveit_setup_assistant-1] #6 Source "/home/ls/ws_moveit/src/moveit2/moveit_core/collision_detection_fcl/src/collision_env_fcl.cpp", line 221, in constructFCLObjectRobot [0x77b2eefc407e]
[moveit_setup_assistant-1] 218: {
[moveit_setup_assistant-1] 219: if (robot_geoms[i] && robot_geoms[i]->collision_geometry)
[moveit_setup_assistant-1] 220: {
[moveit_setup_assistant-1] > 221: transform2fcl(state.getCollisionBodyTransform(robot_geoms[i]->collision_geometry_data->ptr.link,
[moveit_setup_assistant-1] 222: robot_geoms[i]->collision_geometry_data->shape_index),
[moveit_setup_assistant-1] 223: fcl_tf);
[moveit_setup_assistant-1] 224: auto coll_obj = new fcl::CollisionObjectd(*robot_fcl_objs[i]);
[moveit_setup_assistant-1] #5 Source "/home/ls/ws_moveit/src/moveit2/moveit_core/robot_state/include/moveit/robot_state/robot_state.hpp", line 1305, in getCollisionBodyTransform [0x77b2eefc8772]
[moveit_setup_assistant-1] 1303: const Eigen::Isometry3d& getCollisionBodyTransform(const LinkModel* link, std::size_t index) const
[moveit_setup_assistant-1] 1304: {
[moveit_setup_assistant-1] >1305: assert(checkCollisionTransforms());
[moveit_setup_assistant-1] 1306: return global_collision_body_transforms[link->getFirstCollisionBodyTransformIndex() + index];
[moveit_setup_assistant-1] 1307: }
[moveit_setup_assistant-1] #4 Source "./assert/assert.c", line 105, in __assert_fail [0x77b2f303b516]
[moveit_setup_assistant-1] #3 Source "./assert/assert.c", line 96, in __assert_fail_base [0x77b2f302881a]
[moveit_setup_assistant-1] #2 Source "./stdlib/abort.c", line 79, in abort [0x77b2f30288fe]
[moveit_setup_assistant-1] #1 Source "../sysdeps/posix/raise.c", line 26, in raise [0x77b2f304527d]
[moveit_setup_assistant-1] #0 | Source "./nptl/pthread_kill.c", line 89, in __pthread_kill_internal
[moveit_setup_assistant-1] | Source "./nptl/pthread_kill.c", line 78, in __pthread_kill_implementation
[moveit_setup_assistant-1] Source "./nptl/pthread_kill.c", line 44, in __pthread_kill [0x77b2f309eb2c]
[moveit_setup_assistant-1] 已中止 (tkill() 发送的信号 6482 1000)
[ERROR] [moveit_setup_assistant-1]: process has died [pid 6482, exit code -6, cmd '/home/ls/ws_moveit/install/moveit_setup_assistant/lib/moveit_setup_assistant/moveit_setup_assistant --ros-args'].
我想换一种导航方式,并修改urdf文件,应该怎么做呀
vs code 提示更新 includePath,请问怎么更新
截图 2025-05-04 12-59-00.png
从gitee下载的代码,运行第七章导航的时候(source install/setup.bash
ros2 launch fishbot_navigation2 navigation2.launch.py),
在rviz2中重定位后,代价地图显示不出来,报错[rviz2-2] [INFO] [1746326267.446956049] [rviz2]: Message Filter dropping message: frame 'odom' at time 1918.699 for reason 'discarding message because the queue is full'
[rviz2-2] [INFO] [1746326267.449153770] [rviz2]: Message Filter dropping message: frame 'odom' at time 1915.055 for reason 'discarding message because the queue is full
系统版本
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=Raspbian
ID_LIKE=Debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
报错信息:
Traceback (most recent call last):
File "/tmp/fishinstall/install.py", line 134, in <module>
main()
File "/tmp/fishinstall/install.py", line 123, in main
run_tool_file(tools[code]['tool'].replace("/","."))
File "/tmp/fishinstall/tools/base.py", line 1476, in run_tool_file
if tool.run()==False: return False
File "/tmp/fishinstall/tools/tool_install_ros.py", line 415, in run
self.install_ros()
File "/tmp/fishinstall/tools/tool_install_ros.py", line 402, in install_ros
self.check_sys_source()
File "/tmp/fishinstall/tools/tool_install_ros.py", line 218, in check_sys_source
tool.change_sys_source()
File "/tmp/fishinstall/tools/tool_config_system_source.py", line 180, in change_sys_source
source = self.replace_source(failed_sources)
File "/tmp/fishinstall/tools/tool_config_system_source.py", line 169, in replace_source
source,template = self.get_source_by_system(system,codename,arch,failed_sources)
File "/tmp/fishinstall/tools/tool_config_system_source.py", line 154, in get_source_by_system
return fast_source[0],template
IndexError: list index out of range
fatal error: geometry_msgs/msg/twist.hpp: 没有那个文件或目录
a15a75a2-f74b-46f9-90ad-2110204f124d-图片.png
我这边在ubuntu24上源码编译ros1 noetic后,启动roscore卡住了... logging to /home/noetic/.ros/log/9d8fa6f0-2726-11f0-bfde-000c29129e95/roslaunch-noetic-ros1-3526.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
,这边用的是自带的python3.12。之前我在上面部署了虚拟的python3.10,但是在用python_qt_binding编译qt_gui_core的时候,因为虚拟python用pip3 安装pyqt5的版本和sip版本兼容老是有问题导致无法编译过
b116e4e8-0b43-4696-b86c-76e88a7b6223-image.png
4a752a40-cdb2-4615-98af-d7ce9e52892c-image.png
9b8ebe69-6d52-4b9a-b092-be604c2f04e5-image.png
573428f7-3048-42f0-bdfe-06c6864cc804-image.png
56e95359-0357-44c4-9f03-7701136dee2a-image.png
1d5cd0f5-e63c-4e4a-bc62-c4859c838e75-image.png
环境是ubuntu20.04 ros2 foxy
我在代码里用sys.path.append导入
但用colcon build之后还是会报错
[yolov5_tracker_node-1] import torch [yolov5_tracker_node-1] ModuleNotFoundError: No module named 'torch' [ERROR] [yolov5_tracker_node-1]: process has died [pid 24618, exit code 1, cmd from launch import LaunchDescription from launch_ros.actions import Node from launch_ros.substitutions import FindPackageShare from launch.substitutions import PathJoinSubstitution def generate_launch_description(): weights_path = PathJoinSubstitution([ FindPackageShare("yolov5_vehicle_detector"), "weights", "yolov5s.pt" ]) return LaunchDescription([ Node( package="yolov5_vehicle_detector", executable="yolov5_tracker_node", name="yolov5_tracker_node", output="screen", env={'DISPLAY': ':0'}, parameters=[{ "weights": weights_path, "device": "cpu", "imgsz": [640, 640], "conf_thre": 0.5, "iou_thre": 0.5, "camera_source": 0, "visualize": True, }], ) ]) from pathlib import Path from glob import glob from setuptools import setup, find_packages package_name = "yolov5_vehicle_detector" weight_file = Path("src") / "yolov5_vehicle_detector" / "weights" / "yolov5s.pt" data_files = [ ("share/ament_index/resource_index/packages", [f"resource/{package_name}"]), (f"share/{package_name}", ["package.xml"]), (f"share/{package_name}/launch", glob("launch/*.launch.py")), (f"share/{package_name}/weights", [str(weight_file)]), ] package_data = {package_name: ["weights/yolov5s.pt"]} setup( name=package_name, version="0.0.0", packages=find_packages(where='src', include=[package_name, f"{package_name}.*"]), package_dir={'': 'src'}, package_data=package_data, data_files=data_files, install_requires=[ "setuptools", "numpy", "pandas", "Pillow", ], zip_safe=True, maintainer="", maintainer_email="", description="ROS2 Node for YOLOv5 Vehicle Detection and Tracking", license="Apache License 2.0", entry_points={ 'console_scripts': [ 'yolov5_tracker_node = yolov5_vehicle_detector.yolov5_tracker_node:main', ], }, )我构建的命令是
rm -rf build/ install/ log/ colcon build --packages-select yolov5_vehicle_detector_msgs yolov5_vehicle_detector --symlink-install source install/setup.bash ros2 launch yolov5_vehicle_detector tracking.launch.py版本:Ubuntu22.04
在学习这个帖子的时候e5e18b3a-6fcd-4252-af32-103499f9e597-image.png
由于自己的系统里ros版本是ros noetic不兼容 所以需要安装ros2,输入一件安装代码后,还未选择安装选项,于是崩溃,发现wifi断开,打开网络设置也没有wifi选项,于是重启了,重启之后无法进入系统
在社区一键安装帖子里面没有找到类似情况的,于是来发帖了
由于wifi断开,无法上传代码片段,拍了几张图片,带来不便,非常抱歉😢
微信图片_20250430145247_34.jpg 微信图片_20250430145247_35.jpg 微信图片_20250430145247_36.jpg 微信图片_20250430145247_37.jpg !微信图片_20250430145246_38.jpg 微信图片_20250430145246_39.jpg 微信图片_20250430145246_40.jpg 微信图片_20250430145247_41.jpg 微信图片_20250430145246_42.jpg 微信图片_20250430145246_43.jpg 微信图片_20250430145246_44.jpg 微信图片_20250430145247_45.jpg
ubuntu系统启动时界面如下:(出现这样的问题,只能重装系统了吗
微信图片_20250430145246_46.jpg```
版本:Ubuntu22.04
在学习这个帖子的时候e5e18b3a-6fcd-4252-af32-103499f9e597-image.png
由于自己的系统里ros版本是ros noetic不兼容 所以需要安装ros2,输入一件安装代码后,还未选择安装选项,于是崩溃,发现wifi断开,打开网络设置也没有wifi选项,于是重启了,重启之后无法进入系统
由于wifi断开,无法上传代码片段,拍了几张图片,带来不便,非常抱歉😢
微信图片_20250430145247_34.jpg 微信图片_20250430145247_35.jpg 微信图片_20250430145247_36.jpg 微信图片_20250430145247_37.jpg !微信图片_20250430145246_38.jpg 微信图片_20250430145246_39.jpg 微信图片_20250430145246_40.jpg 微信图片_20250430145247_41.jpg 微信图片_20250430145246_42.jpg 微信图片_20250430145246_43.jpg 微信图片_20250430145246_44.jpg 微信图片_20250430145247_45.jpg
ubuntu系统启动时界面如下:(出现这样的问题,只能重装系统了吗
微信图片_20250430145246_46.jpg```
gzclient-3] [Err] [ModelDatabase.cc:394] Unable to get model name[http://models.gazebosim.org/zephyr_delta_wing]
[gzclient-3] [Wrn] [Publisher.cc:135] Queue limit reached for topic /gazebo/default/user_camera/pose, deleting message. This warning is printed only once.
[gzclient-3] [Wrn] [ModelDatabase.cc:212] Unable to connect to model database using [http://models.gazebosim.org/iris_with_standoffs_demo/model.config]. Only locally installed models will be available.
[gzclient-3] [Err] [ModelDatabase.cc:394] Unable to get model name[http://models.gazebosim.org/iris_with_standoffs_demo]
[gzclient-3] [Wrn] [ModelDatabase.cc:212] Unable to connect to model database using [http://models.gazebosim.org/stereo_camera/model.config]. Only locally installed models will be available.
[gzclient-3] [Err] [ModelDatabase.cc:394] Unable to get model name[http://models.gazebosim.org/stereo_camera]
[gzclient-3] [Wrn] [ModelDatabase.cc:212] Unable to connect to model database using [http://models.gazebosim.org/wooden_case/model.config]. Only locally installed models will be available.
[gzclient-3] [Err] [ModelDatabase.cc:394] Unable to get model name[http://models.gazebosim.org/wooden_case]
[gzclient-3] [Wrn] [ModelDatabase.cc:212] Unable to connect to model database using [http://models.gazebosim.org/robocup_spl_ball/model.config]. Only locally installed models will be available.
[gzclient-3] [Err] [ModelDatabase.cc:394] Unable to get model name[http://models.gazebosim.org/robocup_spl_ball]
[gzclient-3] [Wrn] [ModelDatabase.cc:212] Unable to connect to model database using [http://models.gazebosim.org/drc_practice_door_4x8/model.config]. Only locally installed models will be available.
[gzclient-3] [Err] [ModelDatabase.cc:394] Unable to get model name[http://models.gazebosim.org/drc_practice_door_4x8]
[gzclient-3] [Wrn] [ModelDatabase.cc:212] Unable to connect to model database using [http://models.gazebosim.org/disk_part/model.config]. Only locally installed models will be available.
[gzclient-3] [Err] [ModelDatabase.cc:394] Unable to get model name[http://models.gazebosim.org/disk_part]
^[[B^[[B^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[robot_state_publisher-1] [INFO] [1745992845.540325384] [rclcpp]: signal_handler(signum=2)
[INFO] [robot_state_publisher-1]: process has finished cleanly [pid 36983]
报错内容如下:
~/chapt4/chapt4_ws$ colcon build
Starting >>> chapt4_interfaces
--- stderr: chapt4_interfaces
CMake Error at /opt/ros/humble/share/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake:20 (find_package):
By not providing "FindPythonInterp.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"PythonInterp", but CMake did not find one.
Could not find a package configuration file provided by "PythonInterp"
(requested version 3.6) with any of the following names:
Add the installation prefix of "PythonInterp" to CMAKE_PREFIX_PATH or set
"PythonInterp_DIR" to a directory containing one of the above files. If
"PythonInterp" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
/opt/ros/humble/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:48 (include)
/opt/ros/humble/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:286 (ament_execute_extensions)
CMakeLists.txt:13 (rosidl_generate_interfaces)
Failed <<< chapt4_interfaces [1.72s, exited with code 2]
Summary: 0 packages finished [1.81s]
1 package failed: chapt4_interfaces
1 package had stderr output: chapt4_interfaces
开始提示Cmake版本<3.10怎么怎么的,于是我就改了CmakeList文件中第一行为:
cmake_minimum_required(VERSION 4.0)
就有了上面的报错,请问怎么处理?
版块
-
1.3k
主题4.7k
帖子 -
415
主题2.8k
帖子 -
34
主题160
帖子 -
1.0k
主题4.1k
帖子 -
969
主题3.5k
帖子 -
4
主题10
帖子 -
350
主题1.6k
帖子