[Err] [RTShaderSystem.cc:480] Unable to find shader lib. Shader generating will fail. Your GAZEBO_RESOURCE_PATH is probably improperly set. Have you sourced <prefix>/share/gazebo/setup.bash?
[spawn_entity.py-4] [INFO] [1740479071.797195348] [spawn_entity]: Calling service /spawn_entity
[gzserver-2] [Msg] Loading world file [/home/jzx/chapt6/chapt6_ws/install/fishbot_description/share/fishbot_description/world/custom_room.world]
[gzserver-2] [Err] [RenderEngine.cc:197] Failed to initialize scene
[gzserver-2] gzserver: /usr/include/boost/smart_ptr/shared_ptr.hpp:728: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = gazebo::rendering::Scene; typename boost::detail::sp_member_access<T>::type = gazebo::rendering::Scene*]: Assertion `px != 0' failed.
[gzclient-3] [Msg] Waiting for master.
[gzclient-3] [Msg] Connected to gazebo master @ http://127.0.0.1:11345
[gzclient-3] [Msg] Publicized address: 172.17.131.16
[gzclient-3] [Err] [RTShaderSystem.cc:480] Unable to find shader lib. Shader generating will fail. Your GAZEBO_RESOURCE_PATH is probably improperly set. Have you sourced <prefix>/share/gazebo/setup.bash?
[ERROR] [gzserver-2]: process has died [pid 6037, exit code -6, cmd 'gzserver /home/jzx/chapt6/chapt6_ws/install/fishbot_description/share/fishbot_description/world/custom_room.world --verbose -slibgazebo_ros_init.so -slibgazebo_ros_factory.so -slibgazebo_ros_force_system.so'].
[gzserver-2]
[gzclient-3] [Err] [Scene.cc:227] Service call[/shadow_caster_material_name] timed out
[gzclient-3] [Err] [Scene.cc:249] Service call[/shadow_caster_render_back_faces] timed out
[gzclient-3] [Err] [RenderEngine.cc:197] Failed to initialize scene
[gzclient-3] [Err] [GLWidget.cc:177] GLWidget could not create a scene. This will likely result in a blank screen.
[gzclient-3] gzclient: /usr/include/boost/smart_ptr/shared_ptr.hpp:728: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = gazebo::rendering::Camera; typename boost::detail::sp_member_access<T>::type = gazebo::rendering::Camera*]: 断言 "px != 0" 失败。
[ERROR] [gzclient-3]: process has died [pid 6039, exit code -6, cmd 'gzclient --gui-client-plugin=libgazebo_ros_eol_gui.so --verbose'].
[gzclient-3]```
code_text
可以把我的模型简单地理解为一个风车。
我在旋转轴上加了一个 JointController 插件,通过 ros topic 发布速度以控制它的旋转。
但是现在这个 joint 并不旋转,而是连接的 child link 在旋转。
这导致了我无法通过 /tf 获取风车扇叶上某点的实时位置,我通过 /tf 或者 /static_tf 获取的都是静止的,没有旋转的扇叶点的三维坐标。
我在 Rviz2 里面观察我的风车也能看到,它没有在旋转。但是在 Gazebo 中能观察到旋转。
以下是我的 xacro 文件。我通过
robot_description = ParameterValue(Command(['xacro ', buff_model_path]), value_type=str) robot_state_publisher_node = Node( package='robot_state_publisher', executable='robot_state_publisher', parameters=[{'robot_description': robot_description}] ) joint_state_publisher_node = Node( package='joint_state_publisher', executable='joint_state_publisher', name='joint_state_publisher', parameters=[{'robot_description': robot_description}] ) spawn_entity_cmd = Node( package='ros_gz_sim', executable='create', arguments=['-name', 'buff', '-topic', 'robot_description', '-x', '0.0', '-y', '0.0', '-z', '0.0'], output='screen' )将其发布到我的世界里。
<?xml version="1.0"?> <robot name="buff" xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:property name="M_PI" value="3.1415926535"/> <xacro:property name="fan_arm_length" value="0.7"/> <gazebo> <plugin filename="gz-sim-joint-controller-system" name="gz::sim::systems::JointController"> <joint_name>base_horizon_base_axle</joint_name> <initial_velocity>1.0471975512</initial_velocity> <topic>/changeBuffSpeed</topic> </plugin> </gazebo> <xacro:macro name="base_cube" params="name a b c mass"> <link name="${name}"> <visual name="visual"> <geometry> <box size="${a} ${b} ${c}"/> </geometry> </visual> <collision name="collision"> <geometry> <box size="${a} ${b} ${c}"/> </geometry> </collision> <inertial> <mass value="${mass}"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="${mass*(b*b + c*c)/12}" ixy="0" ixz="0" iyy="${mass*(a*a + c*c)/12}" iyz="0" izz="${mass*(a*a + b*b)/12}"/> </inertial> </link> <gazebo reference="${name}"> <material>Gazebo/Red</material> <!-- 修正重力标签语法 --> <gravity>true</gravity> </gazebo> </xacro:macro> <xacro:macro name="joint" params="parent child type xyz rpy"> <joint name="${parent}_${child}" type="${type}"> <parent link="${parent}"/> <child link="${child}"/> <origin xyz="${xyz}" rpy="${rpy}"/> <axis xyz="0 0 1"></axis> </joint> </xacro:macro> <xacro:macro name="base_cylinder" params="name radius length"> <link name="${name}"> <visual name="visual"> <geometry> <cylinder radius="${radius}" length="${length}"/> </geometry> </visual> <collision name="collision"> <geometry> <cylinder radius="${radius}" length="${length}"/> </geometry> </collision> <inertial> <mass value="1"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/> </inertial> </link> </xacro:macro> <xacro:macro name="withPNG_cylinder" params="name radius length mesh"> <link name="${name}"> <visual name="visual"> <geometry> <mesh filename="$(find sim)/model/${mesh}"/> </geometry> </visual> <collision name="collision_${name}"> <geometry> <cylinder radius="${radius}" length="${length}"/> </geometry> </collision> <inertial> <mass value="1"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/> </inertial> </link> </xacro:macro> <xacro:macro name="buff_fan" params="prefix reflect fan_id special"> <xacro:base_cube name="${prefix}_fan_arm_${fan_id}" a="${fan_arm_length}" b="0.050" c="0.04" mass="1.0"/> <xacro:base_cube name="${prefix}_fan_${fan_id}" a="0.372" b="0.372" c="0.05" mass="1.0"/> <xacro:withPNG_cylinder name="${prefix}_fan_hitArea_${fan_id}" radius="0.15" length="0.05" mesh="targets.dae"/> <xacro:joint parent="R_logo_${prefix}" child="${prefix}_fan_arm_${fan_id}" type="fixed" xyz="${-cos((fan_id-1)*72/180*M_PI)*fan_arm_length/2} ${-sin((fan_id-1)*72/180*M_PI)*fan_arm_length/2} ${special}" rpy="0 0 ${72*(fan_id-1)/180*M_PI}" /> <xacro:joint parent="${prefix}_fan_arm_${fan_id}" child="${prefix}_fan_${fan_id}" type="fixed" xyz="${-fan_arm_length/2} 0 0" rpy="0 0 0" /> <xacro:joint parent="${prefix}_fan_${fan_id}" child="${prefix}_fan_hitArea_${fan_id}" type="fixed" xyz="0 0 ${0.00001*reflect}" rpy="0 0 0"/> </xacro:macro> <xacro:base_cylinder name="base_axle" radius="0.008" length="0.2"/> <xacro:macro name="buff" params="prefix reflect"> <xacro:withPNG_cylinder name="R_logo_${prefix}" radius="0.106" length="0.05" mesh="R_logo.dae"/> <xacro:joint parent="base_axle" child="R_logo_${prefix}" type="fixed" xyz="0 0 ${reflect*0.1}" rpy="0 0 0"/> <xacro:buff_fan reflect="${reflect}" prefix="${prefix}" fan_id="1" special="0"/> <xacro:buff_fan reflect="${reflect}" prefix="${prefix}" fan_id="2" special="0"/> <xacro:buff_fan reflect="${reflect}" prefix="${prefix}" fan_id="3" special="0"/> <xacro:buff_fan reflect="${reflect}" prefix="${prefix}" fan_id="4" special="0"/> <xacro:buff_fan reflect="${reflect}" prefix="${prefix}" fan_id="5" special="0"/> </xacro:macro> <xacro:base_cube name="base" a="3.00" b="3.00" c="0.10" mass="9.0"/> <xacro:base_cube name="base_left" a="0.15" b="0.15" c="2.60" mass="1.0"/> <xacro:base_cube name="base_right" a="0.15" b="0.15" c="2.60" mass="1.0"/> <xacro:base_cube name="base_horizon" a="0.15" b="1.80" c="0.15" mass="1.0"/> <link name="world"/> <joint name="fixed" type="fixed"> <parent link="world"/> <child link="base"/> </joint> <xacro:joint parent="base" child="base_horizon" type="fixed" xyz="0 0.0 2.6" rpy="0 0 0"/> <xacro:joint parent="base_horizon" child="base_left" type="fixed" xyz="0 -0.9 -1.3" rpy="0 0 0"/> <xacro:joint parent="base_horizon" child="base_right" type="fixed" xyz="0 0.9 -1.3" rpy="0 0 0"/> <xacro:joint parent="base_horizon" child="base_axle" type="continuous" xyz="0 0.0 0.0" rpy="0 ${M_PI/2} 0"/> <xacro:buff prefix="front" reflect=" 1"/> <xacro:buff prefix="back" reflect="-1"/> </robot>或者有什么别的插件可以获取扇叶点的实时位置吗?
CMake Error at CMakeLists.txt:15 (find_package):
By not providing "Findserial.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "serial", but
CMake did not find one.
Could not find a package configuration file provided by "serial" with any
of the following names:
Add the installation prefix of "serial" to CMAKE_PREFIX_PATH or set
"serial_DIR" to a directory containing one of the above files. If "serial"
provides a separate development package or SDK, be sure it has been
installed.
home/zztg/桌面/zztg_robot_node/src/Robot_SeeWorld.cpp: In member function ‘void CameraPublisherNode::timerCallback()’:
/home/zztg/桌面/zztg_robot_node/src/Robot_SeeWorld.cpp:47:28: error: no matching function for call to ‘rclcpp::Publisher<sensor_msgs::msg::Image_<std::allocator<void> > >::publish(sensor_msgs::msg::Image_<std::allocator<void> >::SharedPtr&)’
47 | image_pub_->publish(msg);
| ~~~~~~~~~~~~~~~^
In file included from /opt/ros/humble/include/rclcpp/rclcpp/topic_statistics/subscription_topic_statistics.hpp:31,
from /opt/ros/humble/include/rclcpp/rclcpp/subscription.hpp:50,
from /opt/ros/humble/include/rclcpp/rclcpp/any_executable.hpp:25,
感觉像是docker出错了,没能拉到合适的下载源
Unable to find image 'fishros2/ros:noetic-desktop-full' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Run 'docker run --help' for more information
Run CMD Task:[docker exec -it noetic1 /bin/bash -c "echo -e '
source /opt/ros/noetic/setup.bash' >> ~/.bashrc" ]
Error response from daemon: No such container: noetic1
Run CMD Task:[xhost +local:]
non-network local connections being added to access control list
0ca60c4698972232a8b3eb1a04321da.jpg
*
代码直接从gitee上拷贝的。
车子直线行驶 两个轮子转动圈数不同 并且有蜂鸣声响
https://fishros.com/d2lros2/#/humble/chapt16/10.控制速度-PID控制器实现
c8d4524a-f1e8-470d-847e-755bfcccda16-image.png
c63e26b4-a255-4e24-a53e-c6fa4a295703-image.png
https://gitee.com/qq724789975/rostest.git
car_platformio
教程中源码 打印
f2a54523-3fa7-4f8c-98f1-6778004a5e9c-image.png
使用的是C++,在进行colcon build时出现:Starting >>> demo_cpp_pkg
[14.821s] WARNING:colcon.colcon_cmake.task.cmake.build:Could not build CMake package 'demo_cpp_pkg' because the CMake cache has no 'CMAKE_PROJECT_NAME' variable
--- stderr: demo_cpp_pkg
请问这是怎么回事,怎么解决?
xiexie
382bf550-36b9-4e33-b87d-d955da7660dc-image.png 0d76188d-240f-497c-82ad-cd84302585e8-image.png 3d66dc16-107d-46fa-8bfe-48d7dd4c432e-image.png 976e2cf0-dd6e-4401-94b4-fe05849b00b8-image.png
求解,着急,一直说我时间戳不对,/scan发布的比/tf早,但是我把这俩发布放同一个进程里面了,/tf发布以后睡眠1ms后再发布的/scan,并且使用了同一个时间戳值,时间戳延后什么的,加快/tf发布频率等方式都试过了,还是解决不了7c8cbab3-6ba2-49ba-bd93-7081fb47b779-image.png
电脑品牌 联想
Ubuntu 20.04系统
准备安装ROS1
在更换系统源并清理第三方源的时候,中间出现了这条红色的信息,我想请问一下,这是什么错误。我看到下面还有一条一样的命令,是不是又重新操作一遍,使结果成功了?
会不会对我后续使用ROS1有什么影响?
Screenshot from 2025-02-23 11-44-51.png
(base) zztg@zztg:~/桌面/ZZTG_ROBOT$ colcon build
WARNING: Package name "ZZTG_ROBOT" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
Starting >>> ZZTG_ROBOT
--- stderr: ZZTG_ROBOT
Traceback (most recent call last):
File "/opt/ros/humble/share/ament_cmake_core/cmake/core/package_xml_2_cmake.py", line 22, in <module>
from catkin_pkg.package import parse_package_string
ModuleNotFoundError: No module named 'catkin_pkg'
CMake Error at /opt/ros/humble/share/ament_cmake_core/cmake/core/ament_package_xml.cmake:95 (message):
execute_process(/home/zztg/anaconda3/bin/python3
/opt/ros/humble/share/ament_cmake_core/cmake/core/package_xml_2_cmake.py
/home/zztg/桌面/ZZTG_ROBOT/package.xml
/home/zztg/桌面/ZZTG_ROBOT/build/ZZTG_ROBOT/ament_cmake_core/package.cmake)
returned error code 1
Call Stack (most recent call first):
/opt/ros/humble/share/ament_cmake_core/cmake/core/ament_package_xml.cmake:49 (_ament_package_xml)
/opt/ros/humble/share/ament_lint_auto/cmake/ament_lint_auto_find_test_dependencies.cmake:31 (ament_package_xml)
CMakeLists.txt:24 (ament_lint_auto_find_test_dependencies)
Failed <<< ZZTG_ROBOT [0.74s, exited with code 1]
ac2c6870-d247-408e-9f1c-5d79497a2aec-图片.png
an@ubuntu:~/chat2_cpp/chapt2_ws$ ros2 run demo_python_pkg person_node
/opt/ros/foxy/bin/ros2:6: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
from pkg_resources import load_entry_point
No executable found
版块
-
1.2k
主题4.6k
帖子 -
348
主题2.3k
帖子 -
5
主题32
帖子 -
929
主题3.9k
帖子 -
918
主题3.4k
帖子 -
2
主题5
帖子 -
341
主题1.5k
帖子