@2951612645 请问您解决了吗,遇到同样的问题
终端运行指令
ros2 run v4l2_camera v4l2_camera_node然后终端输出
[INFO] [1740129310.150471961] [v4l2_camera]: Driver: uvcvideo [INFO] [1740129310.151033248] [v4l2_camera]: Version: 331688 [INFO] [1740129310.151131432] [v4l2_camera]: Device: USB Camera: USB Camera [INFO] [1740129310.151178135] [v4l2_camera]: Location: usb-0000:01:00.0-1.2 [INFO] [1740129310.151216116] [v4l2_camera]: Capabilities: [INFO] [1740129310.151256263] [v4l2_camera]: Read/write: NO [INFO] [1740129310.151294726] [v4l2_camera]: Streaming: YES [INFO] [1740129310.151354058] [v4l2_camera]: Current pixel format: MJPG @ 1920x1080 [INFO] [1740129310.151693294] [v4l2_camera]: Available pixel formats: [INFO] [1740129310.151753626] [v4l2_camera]: MJPG - Motion-JPEG [INFO] [1740129310.151794755] [v4l2_camera]: YUYV - YUYV 4:2:2 [INFO] [1740129310.151832773] [v4l2_camera]: Available controls: [INFO] [1740129310.151887587] [v4l2_camera]: Brightness (1) = 0 [INFO] [1740129310.151939845] [v4l2_camera]: Contrast (1) = 34 [INFO] [1740129310.151990789] [v4l2_camera]: Saturation (1) = 56 [INFO] [1740129310.152039881] [v4l2_camera]: Hue (1) = 0 [INFO] [1740129310.152087954] [v4l2_camera]: White Balance, Automatic (2) = 1 [INFO] [1740129310.152136453] [v4l2_camera]: Gamma (1) = 100 [INFO] [1740129310.152183989] [v4l2_camera]: Gain (1) = 0 [INFO] [1740129310.152231563] [v4l2_camera]: Power Line Frequency (3) = 1 [INFO] [1740129310.152658352] [v4l2_camera]: White Balance Temperature (1) = 4000 [inactive] [INFO] [1740129310.152733444] [v4l2_camera]: Sharpness (1) = 2 [INFO] [1740129310.152827553] [v4l2_camera]: Backlight Compensation (1) = 0 [ERROR] [1740129310.152889515] [v4l2_camera]: Failed getting value for control 10092545: Permission denied (13); returning 0! [INFO] [1740129310.152935329] [v4l2_camera]: Camera Controls (6) = 0 [INFO] [1740129310.152987162] [v4l2_camera]: Auto Exposure (3) = 3 [INFO] [1740129310.153370119] [v4l2_camera]: Exposure Time, Absolute (1) = 313 [inactive] [INFO] [1740129310.153436433] [v4l2_camera]: Exposure, Dynamic Framerate (2) = 1 [ERROR] [1740129310.154025368] [v4l2_camera]: Failed getting value for control 10094856: Input/output error (5); returning 0! [INFO] [1740129310.154085033] [v4l2_camera]: Pan, Absolute (1) = 0 [ERROR] [1740129310.154709412] [v4l2_camera]: Failed getting value for control 10094857: Input/output error (5); returning 0! [INFO] [1740129310.154836244] [v4l2_camera]: Tilt, Absolute (1) = 0 [WARN] [1740129310.156985969] [v4l2_camera]: Control type not currently supported: 6, for control: Camera Controls terminate called after throwing an instance of 'rclcpp::exceptions::InvalidParameterValueException' what(): parameter 'pan_absolute' could not be set: Parameter {pan_absolute} doesn't comply with integer range. [ros2run]: Aborted当前用户是有操作摄像头的权限的,但依然还是出现这些问题,请各位大佬帮忙看看
a62806d8-b04f-4097-a0e2-0f028d309dc3-image.png 求大佬帮我看看,/tf发布了三个变换,/odom也正常发布了,/scan不知道什么原因没有在这里显示出来,但是使用echo可以打印发布的内容,内容频率什么的已经问过gpt了,tf树也可视化过了,都没什么问题。但是就/odom没法接收,一直报错。有试过将odom设置成base_frame,没报错了,但是/map不发布。求解😩
环境:WSL2 Ubuntu-22.04
错误:qt无法正常显示中文
72e9b13d-dab6-427f-98a9-20118ca1ec63-image.png
代码和书上的一样。
在《ROS2机器人开发 从入门到实践》中讲到了给机器人安装深度相机插件和激光雷达插件,但是在移动机器人导航时只用到了激光雷达的建图和导航,似乎深度相机并没有什么用处。在这里想要请教各位,现想要用深度相机进行移动机器人的建图和导航该如何做呢?以我学习到的知识来说似乎需要写一个配置文件,至于具体的操作并不是很清楚,请各位有这方面能力的大佬不吝赐教。
sunrise@ubuntu:~/laser_ws$ colcon build --parallel-workers 8
Starting >>> openslam_gmapping
Starting >>> rf2o_laser_odometry
Starting >>> ydlidar_ros2_driver
Finished <<< openslam_gmapping [1.47s]
Starting >>> slam_gmapping
[Processing: rf2o_laser_odometry, slam_gmapping, ydlidar_ros2_driver]
[Processing: rf2o_laser_odometry, slam_gmapping, ydlidar_ros2_driver]
[Processing: rf2o_laser_odometry, slam_gmapping, ydlidar_ros2_driver]
[Processing: rf2o_laser_odometry, slam_gmapping, ydlidar_ros2_driver]
[2min 54.4s] [1/4 complete] [3 ongoing] ...[Processing: rf2o_laser_odometry, slam_gmapping, ydlidar_ros2_driver]
自定义通信接口例子,SystemStatus.msg 构建功能包时,命令行
colcon build --packages-select status_interfaces
报错信息如下:
Starting >>> status_interfaces
--- stderr: status_interfaces
CMake Error at /opt/ros/jazzy/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:234 (list):
list index: 1 out of range (-1, 0)
Call Stack (most recent call first):
CMakeLists.txt:16 (rosidl_generate_interfaces)
CMake Error at /opt/ros/jazzy/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:234 (list):
list index: 1 out of range (-1, 0)
Call Stack (most recent call first):
CMakeLists.txt:16 (rosidl_generate_interfaces)
CMake Error at /opt/ros/jazzy/share/rosidl_generator_type_description/cmake/rosidl_generator_type_description_generate_interfaces.cmake:68 (message):
Target dependency
'/ROS2/pkg_ws/build/status_interfaces/rosidl_adapter/status_interfaces/msg/SystemStatus.idl'
does not exist
Call Stack (most recent call first):
/opt/ros/jazzy/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:48 (include)
/opt/ros/jazzy/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:280 (ament_execute_extensions)
CMakeLists.txt:16 (rosidl_generate_interfaces)
操作步骤如下:
1.使用下面命令创建工作区间后
ros2 pkg create status_interfaces --build-type ament_cmake --dependencies rosidl_default_generators builtin_interfaces --license Apache-2.0
2.建立文件 status_interfaces/msg/SystemStatus.msg
3.CMLists.txt内容如下
cmake_minimum_required(VERSION 3.8)
project(status_interfaces)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(std_msgs REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(builtin_interfaces REQUIRED)
rosidl_generate_interfaces(${PROJECT_NAME}
"msg/SystemStatus.msg"
DEPENDENCIES builtin_interfaces
)
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
set(ament_cmake_copyright_FOUND TRUE)
the following line skips cpplint (only works in a git repo) comment the line when this package is in a git repo and when a copyright and license is added to all source filesset(ament_cmake_cpplint_FOUND TRUE)
ament_lint_auto_find_test_dependencies()
endif()
ament_package()
4.package.xml内容如下
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>status_interfaces</name>
<version>0.0.0</version>
<description>TODO: Package description</description>
<maintainer email="d@todo.todo">d</maintainer>
<license>Apache-2.0</license>
<buildtool_depend>ament_cmake</buildtool_depend>
<depend>rclcpp</depend>
<depend>std_msgs</depend>
<build_depend>rosidl_default_generators</build_depend>
<exec_depend>rosidl_default_runtime</exec_depend>
<member_of_group>rosidl_interface_packages</member_of_group>
<depend>builtin_interfaces</depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
<export>
<build_type>ament_cmake</build_type>
</export>
</package>
1.png 2.png 3.png
/home/tan/.local/lib/python3.8/site-packages/setuptools/dist.py:495: SetuptoolsDeprecationWarning: Invalid dash-separated options
!!
!!
opt = self.warn_dash_deprecation(opt, section)
/home/tan/.local/lib/python3.8/site-packages/setuptools/dist.py:495: SetuptoolsDeprecationWarning: Invalid dash-separated options
!!
!!
opt = self.warn_dash_deprecation(opt, section)
5e380fd0-c83d-4556-a728-f9f4c7d96be6-image.png
为什么这里的里程计使用的的是小车局部坐标系下的线速度和角速度。
里程计的线速度和角速度不应该实在全局坐标系下的吗。
请问一下这是什么问题导致,所有包编译都有问题
0f943f5a-46c9-4fe7-9a5a-b77e38815858-image.png
hb@hb-VMware-Virtual-Platform:/Ashared/RosWorkSpace/chart3$ python3 -m http.server
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
127.0.0.1 - - 【02/Jan/2025 22:59:48】 code 404, message File not found
127.0.0.1 - - 【02/Jan/2025 22:59:48】 "GET /novel1.txt HTTP/1.1" 404 -
网上找了一个urdf代码,通过launch文件在rviz中启动,模型是正常的,于是就尝试添加gazebo的颜色标签,通过launch文件将urdf代码加载进gazebo中进行显示。发现无法显示,卡了很久了,该launch文件没有问题,加载其余的可以在gazebo中正常显示。为什么只加了gazebo颜色标签却无法显示呢。下面是urdf代码部分
<?xml version="1.0" encoding="utf-8"?>
<robot name="mini_akm_robot">
<link name="base_footprint">
</link>
<link name="base_link">
<inertial>
<origin
xyz="-0.0119754973846389 -0.000133372463647142 0.021017784029409" rpy="0 0 0" />
<mass
value="0.431538267108837" />
<inertia
ixx="0.00025452933099881"
ixy="1.90798049636859E-06"
ixz="-8.81627294628033E-07"
iyy="0.00037243817570695"
iyz="4.03071469874943E-07"
izz="0.000540327179164314" />
</inertial>
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<mesh filename="package://four_wheel_ackermann/meshes/mini_akm_robot_meshes/base_link.STL" />
</geometry>
<material name="white">
<color rgba="1 1 1 1"/>
</material>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<mesh
filename="package://four_wheel_ackermann/meshes/mini_akm_robot_meshes/base_link.STL" />
</geometry>
</collision>
</link>
<gazebo reference="base_link">
<material>Gazebo/White</material>
</gazebo>
<joint name="base_joint" type="fixed">
<parent link="base_footprint" />
<child link="base_link" />
<origin xyz="0.0 0.0 0.022" rpy="0 0 0" />
</joint>
<link name="lb_link">
<inertial>
<origin
xyz="-1.74588455068014E-07 -0.000208203511794444 3.83077326214509E-08"
rpy="0 0 0" />
<mass
value="0.0456749740999707" />
<inertia
ixx="1.81808801892974E-05"
ixy="-1.7622297358917E-11"
ixz="3.41287253300913E-12"
iyy="3.14403863492233E-05"
iyz="1.33311989069345E-11"
izz="1.81803662298203E-05" />
</inertial>
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<mesh
filename="package://four_wheel_ackermann/meshes/mini_akm_robot_meshes/lb_link.STL" />
</geometry>
<material name="black">
<color rgba="0 0 0 1"/>
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://four_wheel_ackermann/meshes/mini_akm_robot_meshes/lb_link.STL" />
</geometry>
</collision>
</link>
<gazebo reference="lb_link">
<material>Gazebo/Black</material>
</gazebo>
<joint name="lb_joint"
type="continuous">
<origin xyz="-0.069657 0.07975 0.0162" rpy="0 0 0" />
<parent
link="base_link" />
<child
link="lb_link" />
<axis
xyz="0 -1 0" />
</joint>
<link name="rb_link">
<inertial>
<origin
xyz="-1.21641156911045E-07 0.000208202847118158 3.82869461863777E-08"
rpy="0 0 0" />
<mass
value="0.0456749740269158" />
<inertia
ixx="1.81808800640407E-05"
ixy="-1.76128053558607E-11"
ixz="-3.39346241698698E-12"
iyy="3.14403861845454E-05"
iyz="-1.33298144631598E-11"
izz="1.81803661907041E-05" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://four_wheel_ackermann/meshes/mini_akm_robot_meshes/rb_link.STL" />
</geometry>
<material name="black">
<color rgba="0 0 0 1"/>
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://four_wheel_ackermann/meshes/mini_akm_robot_meshes/rb_link.STL" />
</geometry>
</collision>
</link>
<gazebo reference="rb_link">
<material>Gazebo/Black</material>
</gazebo>
<joint name="rb_joint"
type="continuous">
<origin
xyz="-0.069657 -0.079776 0.0162"
rpy="0 0 0" />
<parent
link="base_link" />
<child
link="rb_link" />
<axis
xyz="0 -1 0" />
</joint>
<link name="laser_link">
<inertial>
<origin
xyz="0.00196458631092469 -3.57895453832374E-06 -0.000201831632616292"
rpy="0 0 0" />
<mass
value="0.0477519163756088" />
<inertia
ixx="3.38461999756745E-05"
ixy="-2.19897168323003E-09"
ixz="1.07118468678157E-06"
iyy="3.94150415873187E-05"
iyz="6.83978024968062E-10"
izz="5.60787042126573E-05" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://four_wheel_ackermann/meshes/mini_akm_robot_meshes/laser.STL" />
</geometry>
<material name="blue">
<color rgba="0 0 0.4 1"/>
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://four_wheel_ackermann/meshes/mini_akm_robot_meshes/laser.STL" />
</geometry>
</collision>
</link>
<gazebo reference="laser_link">
<material>Gazebo/Blue</material>
</gazebo>
<joint name="laser_joint"
type="fixed">
<origin
xyz="0.051343 -1.2576E-05 0.094524"
rpy="0 0 3.1416" />
<parent
link="base_link" />
<child
link="laser_link" />
<axis
xyz="0 0 0" />
</joint>
<link name="left_link">
<inertial>
<origin
xyz="-0.00429085747483857 0.0111736945302178 -0.0110145847149603"
rpy="0 0 0" />
<mass
value="0.00476959924663217" />
<inertia
ixx="2.06909949437508E-07"
ixy="-1.04973296356064E-07"
ixz="-1.49927893294707E-09"
iyy="3.93341439527907E-07"
iyz="-5.98007533541798E-10"
izz="4.63369851558769E-07" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://four_wheel_ackermann/meshes/mini_akm_robot_meshes/left_link.STL" />
</geometry>
<material name="black">
<color rgba="0 0 0 1"/>
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://four_wheel_ackermann/meshes/mini_akm_robot_meshes/left_link.STL" />
</geometry>
</collision>
</link>
<gazebo reference="left_link">
<material>Gazebo/Black</material>
</gazebo>
<joint name="left_joint"
type="revolute">
<origin
xyz="0.073593 0.051987 0.022"
rpy="0 0 0" />
<parent
link="base_link" />
<child
link="left_link" />
<axis
xyz="0 0 -1" />
<limit
lower="-0.39"
upper="0.39"
effort="0"
velocity="0" />
</joint>
<link name="lf_link">
<inertial>
<origin
xyz="-1.41585548674161E-07 1.91747322367264E-07 -4.64079716027549E-08"
rpy="0 0 0" />
<mass
value="0.0441313542614254" />
<inertia
ixx="1.8122375254286E-05"
ixy="1.01605691640891E-11"
ixz="3.10311319459123E-12"
iyy="3.14074902671165E-05"
iyz="-3.35423251171137E-13"
izz="1.81223732297953E-05" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://four_wheel_ackermann/meshes/mini_akm_robot_meshes/lf_link.STL" />
</geometry>
<material name="black">
<color rgba="0 0 0 1"/>
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://four_wheel_ackermann/meshes/mini_akm_robot_meshes/lf_link.STL" />
</geometry>
</collision>
</link>
<gazebo reference="lf_link">
<material>Gazebo/Black</material>
</gazebo>
<joint name="lf_joint"
type="continuous">
<origin
xyz="0 0.0301260014087184 -0.0109999999999987"
rpy="0 0 0" />
<parent
link="left_link" />
<child
link="lf_link" />
<axis
xyz="0 -1 0" />
</joint>
<link name="right_link">
<inertial>
<origin
xyz="-0.00429085795403265 -0.0111736943537972 -0.0109854152864204"
rpy="0 0 0" />
<mass
value="0.00476959923857933" />
<inertia
ixx="2.06909958805082E-07"
ixy="1.0497330410809E-07"
ixz="1.4992787833529E-09"
iyy="3.9334142732894E-07"
iyz="-5.98007566775091E-10"
izz="4.63369848741371E-07" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://four_wheel_ackermann/meshes/mini_akm_robot_meshes/right_link.STL" />
</geometry>
<material name="black">
<color rgba="0 0 0 1"/>
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://four_wheel_ackermann/meshes/mini_akm_robot_meshes/right_link.STL" />
</geometry>
</collision>
</link>
<gazebo reference="right_link">
<material>Gazebo/Black</material>
</gazebo>
<joint name="right_joint"
type="revolute">
<origin
xyz="0.0735933420063898 -0.0520125752742397 0.0219999999999997"
rpy="0 0 0" />
<parent
link="base_link" />
<child
link="right_link" />
<axis
xyz="0 0 1" />
<limit
lower="-0.39"
upper="0.39"
effort="0"
velocity="0" />
</joint>
<link name="rf_link">
<inertial>
<origin
xyz="-1.82018104019632E-07 -1.9296458401985E-07 -3.39361436400148E-08"
rpy="0 0 0" />
<mass
value="0.0441313541199343" />
<inertia
ixx="1.81223720754189E-05"
ixy="8.14282826550161E-12"
ixz="-2.30932816847721E-12"
iyy="3.14074908686231E-05"
iyz="-6.6892241788197E-12"
izz="1.81223769687268E-05" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://four_wheel_ackermann/meshes/mini_akm_robot_meshes/rf_link.STL" />
</geometry>
<material name="black">
<color rgba="0 0 0 1"/>
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://four_wheel_ackermann/meshes/mini_akm_robot_meshes/rf_link.STL" />
</geometry>
</collision>
</link>
<gazebo reference="rf_link">
<material>Gazebo/Black</material>
</gazebo>
<joint name="rf_joint"
type="continuous">
<origin
xyz="0 -0.0301260001523718 -0.0109999999999997"
rpy="0 0 0" />
<parent
link="right_link" />
<child
link="rf_link" />
<axis
xyz="0 -1 0" />
</joint>
</robot>
4a58484e-3f5a-4b0b-901e-73b8e28ad219-image.png
并且按照教学视频里面放置2D Pose Estimate 点后,没有反应,左下角依然为unknown状态,源码是直接从gitee仓库拷贝来的
817b196a-1212-485b-bb4a-26ae2e4c7fec-image.png
求解答
python在3.10以上版本提供了一种保护机制,用户无法使用 sudo pip3 install rosdepc 命令直接在系统环境下安装包,只能采用 虚拟安装或者pipx方式进行安装,但是使用虚拟安装以后,包整体的路径会发生变化,虽然rosdepc与rosdep都是安装成功的,但是导致rosdepc一直提示 找不到rosdep,所以个人感觉在这种环境下安装,必须修改作者的源文件的相关路径的配置。
我使用pipx 安装后路径为 home/duan/.local/bin/rosdepc rosdep也在这个目录下,请大神指点我应该怎么修改,或者修改rosdepc的那个文件?
62698eb0-2fea-486a-8050-f933b87438f9-截图 2025-02-17 23-07-11.png /home/duan/Pictures/截图/截图 2025-02-17 23-07-11.png
执行初始化命令一直提示 rosdep:not found,烦请指教啊。
请问ros可以做六自由度并联机构的仿真吗?类似于Stewart平台那种,并且如果要做的话,相关的urdf文件很庞大,如何得到呢,目前我已知的方法是通过sw导出urdf文件。
版块
-
1.2k
主题4.6k
帖子 -
347
主题2.3k
帖子 -
3
主题26
帖子 -
920
主题3.9k
帖子 -
916
主题3.4k
帖子 -
2
主题5
帖子 -
341
主题1.5k
帖子