小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
按教程9.3做法,launch启动gazebo不显示机器人
-
谢谢鱼哥,把conda关闭后,一切可以正常显示了
-
此回复已被删除! -
此回复已被删除! -
@小鱼 我这边也有类似的问题 launch时没有机器人显示 不过我是conda关闭后仍然出现
[ERROR] [spawn_entity.py-2]: process has died [pid 8641, exit code 1, cmd '/opt/ros/humble/lib/gazebo_ros/spawn_entity.py -entity fishbot -file /home/fzj/fishbot_description/install/fishbot_description/share/fishbot_description/urdf/fishbot_gazebo.urdf --ros-args']. -
此回复已被删除! -
@1691904680 解决了吗,我也遇到了这个问题
-
请问帖主解决了吗?想问问是否有这种gazebo左右轮的情况(rviz是可以显示的)`
<?xml version="1.0"?>
<robot name="fishbot"><!-- base link -->
<link name="base_link">
<visual>
<origin xyz="0 0 0.0" rpy="0 0 0" />
<geometry>
<cylinder length="0.12" radius="0.10" />
</geometry>
<material name="blue">
<color rgba="0.1 0.1 1.0 0.5" />
</material>
</visual>
<collision>
<origin xyz="0 0 0.0" rpy="0 0 0" />
<geometry>
<cylinder length="0.12" radius="0.10" />
</geometry>
<material name="blue">
<color rgba="0.1 0.1 1.0 0.5" />
</material>
</collision>
<inertial>
<mass value="0.2" />
<inertia ixx="0.0122666" ixy="0" ixz="0" iyy="0.0122666" iyz="0" izz="0.02" />
</inertial>
</link><!-- laser link -->
<link name="laser_link">
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<cylinder length="0.02" radius="0.02" />
</geometry>
<material name="black">
<color rgba="0.0 0.0 0.0 0.5" />
</material>
</visual>
</link><!-- laser joint -->
<joint name="laser_joint" type="fixed">
<parent link="base_link" />
<child link="laser_link" />
<origin xyz="0 0 0.075" />
</joint><link name="imu_link">
<visual>
<origin xyz="0 0 0.0" rpy="0 0 0" />
<geometry>
<box size="0.02 0.02 0.02" />
</geometry>
</visual>
</link><!-- imu joint -->
<joint name="imu_joint" type="fixed">
<parent link="base_link" />
<child link="imu_link" />
<origin xyz="0 0 0.02" />
</joint><link name="left_wheel_link">
<visual>
<origin xyz="0 0 0" rpy="1.57079 0 0" />
<geometry>
<cylinder length="0.04" radius="0.032" />
</geometry>
<material name="black">
<color rgba="0.0 0.0 0.0 0.5" />
</material>
</visual>
</link><joint name="left_wheel_joint" type="continuous">
<origin xyz="-0.02 0.10 -0.06" rpy="0 0 0"/>
<parent link="base_link" />
<child link="left_wheel_link" />
<axis xyz="0 1 0" />
</joint><link name="right_wheel_link">
<visual>
<origin xyz="0 0 0" rpy="1.57079 0 0" />
<geometry>
<cylinder length="0.04" radius="0.032" />
</geometry>
<material name="black">
<color rgba="0.0 0.0 0.0 0.5" />
</material>
</visual>
</link><joint name="right_wheel_joint" type="continuous">
<origin xyz="-0.02 -0.10 -0.06" rpy="0 0 0"/>
<parent link="base_link" />
<child link="right_wheel_link" />
<axis xyz="0 1 0" />
</joint><link name="caster_link">
<visual>
<origin xyz="0 0 0" rpy="1.57079 0 0" />
<geometry>
<sphere radius="0.016" />
</geometry>
<material name="black">
<color rgba="0.0 0.0 0.0 0.5" />
</material>
</visual>
</link><joint name="caster_joint" type="fixed">
<parent link="base_link" />
<child link="caster_link" />
<origin xyz="0.06 0.0 -0.076" rpy="0 0 0"/>
<axis xyz="0 1 0" />
</joint><!--Robot
Footprint -->
<link name="base_footprint" /><joint name="base_joint" type="fixed">
<parent link="base_footprint" />
<child link="base_link" />
<origin xyz="0.0 0.0 0.076" rpy="0 0 0" />
</joint><gazebo>
<plugin name='diff_drive' filename='libgazebo_ros_diff_drive.so'>
<ros>
<namespace>/</namespace>
<remapping>cmd_vel:=cmd_vel</remapping>
<remapping>odom:=odom</remapping>
</ros>
<update_rate>30</update_rate>
<!-- wheels -->
<left_joint>left_wheel_joint</left_joint>
<right_joint>right_wheel_joint</right_joint>
<!-- kinematics -->
<wheel_separation>0.2</wheel_separation>
<wheel_diameter>0.065</wheel_diameter>
<!-- limits -->
<max_wheel_torque>20</max_wheel_torque>
<max_wheel_acceleration>1.0</max_wheel_acceleration>
<!-- output -->
<publish_odom>true</publish_odom>
<publish_odom_tf>true</publish_odom_tf>
<publish_wheel_tf>true</publish_wheel_tf>
<odometry_frame>odom</odometry_frame>
<robot_base_frame>base_footprint</robot_base_frame>
</plugin>
</gazebo>
</robot> -
@Mac-Guffin 解决了吗哥,我也遇到了这个问题
-
@2382726705 解决了,是因为其他link
没有加collision和inertial,每一个模块都需要按照base_link一样加这两个参数 -
@Mac-Guffin 好勒好勒,谢谢哥