Gazebo给小车添加摄像头

在给小车添加摄像头时,可以单独显示小车,摄像头,但一5按教程配置在一起就报如下错误

[ WARN] [1724149276.384409352]: link 'base_link' material 'yellow' undefined.
[ WARN] [1724149276.384794680]: link 'base_link' material 'yellow' undefined.
[ WARN] [1724149276.384903987]: link 'camera_link' material 'black' undefined.
[ WARN] [1724149276.384912483]: link 'camera_link' material 'black' undefined.
[ERROR] [1724149276.384939203]: link 'base_link' is not unique.
[ WARN] [1724149276.446035666, 64.670000000]: Shutdown request received.
[ WARN] [1724149276.446080591, 64.670000000]: Reason given for shutdown: [[/robot_state_publisher] Reason: new node registered with same name]
[ INFO] [1724149276.696666121]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1724149276.697464740]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[robot_state_publisher-4] process has died [pid 2285406, exit code 1, cmd /opt/ros/noetic/lib/robot_state_publisher/robot_state_publisher __name:=robot_state_publisher __log:=/home/xu/.ros/log/285ac70e-5ea3-11ef-862c-bd2887b18366/robot_state_publisher-4.log].
log file: /home/xu/.ros/log/285ac70e-5ea3-11ef-862c-bd2887b18366/robot_state_publisher-4*.log
[ INFO] [1724149276.741219446]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1724149276.741861719]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
[ WARN] [1724149276.747882301, 64.670000000]: Shutdown request received.
[ WARN] [1724149276.747957563, 64.670000000]: Reason given for shutdown: [[/gazebo_gui] Reason: new node registered with same name]
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/joint_state_publisher/joint_state_publisher", line 44, in <module>
    jsp.loop()
  File "/opt/ros/noetic/lib/python3/dist-packages/joint_state_publisher/__init__.py", line 273, in loop
    msg.position[i] = joint['position'] * factor + offset
IndexError: list assignment index out of range
[INFO] [1724149276.884587, 0.000000]: Loading model XML from ros parameter robot_description
[INFO] [1724149276.888994, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[ INFO] [1724149277.003039085]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1724149277.012861399]: Physics dynamic reconfigure ready.
[INFO] [1724149277.191586, 0.180000]: Calling service /gazebo/spawn_urdf_model
Error [parser_urdf.cc:3154] Unable to call parseURDF on robot model
Error [parser.cc:488] parse as old deprecated model file failed.
[joint_state_publisher-3] process has died [pid 2285403, exit code 1, cmd /opt/ros/noetic/lib/joint_state_publisher/joint_state_publisher __name:=joint_state_publisher __log:=/home/xu/.ros/log/285ac70e-5ea3-11ef-862c-bd2887b18366/joint_state_publisher-3.log].
log file: /home/xu/.ros/log/285ac70e-5ea3-11ef-862c-bd2887b18366/joint_state_publisher-3*.log
[INFO] [1724149287.214168, 10.190000]: Spawn status: SpawnModel: Entity pushed to spawn queue, but spawn service timed out waiting for entity to appear in simulation under the name mrobot
[ERROR] [1724149287.215522, 10.190000]: Spawn service failed. Exiting.
[urdf_spawner-5] process has died [pid 2285407, exit code 1, cmd /opt/ros/noetic/lib/gazebo_ros/spawn_model -urdf -model mrobot -param robot_description __name:=urdf_spawner __log:=/home/xu/.ros/log/285ac70e-5ea3-11ef-862c-bd2887b18366/urdf_spawner-5.log].
log file: /home/xu/.ros/log/285ac70e-5ea3-11ef-862c-bd2887b18366/urdf_spawner-5*.log

服务器的ubuntu版本是20.04 ros是noetic

配置文件如下

<?xml version="1.0"?>

<robot name="mrobot" xmlns:xacro="http://www.ros.org/wiki/xacro">

	<!--car-->
	<xacro:include filename="$(find mrobot_gazebo)/urdf/my_gazebo_robot_car.urdf.xacro" />
	<xacro:include filename="$(find mrobot_gazebo)/urdf/camera.xacro" />


	<xacro:property name="camera_offset_x" value="0" />
	<xacro:property name="camera_offset_y" value="0" />
	<xacro:property name="camera_offset_z" value="0.02" />

	<!-- Body of mrobot, with plates, standoffs -->
	<xacro:mrobot_body/>


	<!-- Attach the Kinect -->
	<joint name="camera_joint" type="fixed">
		<origin xyz="${camera_offset_x} ${camera_offset_y} ${camera_offset_z}" rpy="0 0 0" />
		<parent link="plate_1_link"/>
		<child link="camera_link"/>
	</joint>

	<xacro:usb_camera prefix="camera"/>

</robot>

报错且不显示模型

有大佬知道该如何解决吗

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值