ROS2测试仿真

电脑配置:R7-7840H 核显

结论:turtlebot3 运行失败。

turtlebot4 可以进入仿真环境,但是无法操作。

现在在用 ign gazebo 驱动简单的差分机器人

ign gazebo

采用ign gazebo 打开简单的差分机器人

安装

javascript 复制代码
sudo apt-get install ros-${ROS_DISTRO}-ros-gz
sudo apt install ros-humble-gazebo-ros-pkgs 

# 桥接器 用于 ros2与gazebo Transport 之间交换信息
sudo apt-get install ros-humble-ros-ign-bridge

# 接受键盘信息并转为 twist
sudo apt-get install ros-humble-teleop-twist-keyboard

运行

javascript 复制代码
# 运行仿真
ign gazebo -v 4 -r visualize_lidar.sdf

# 查看话题
ign topic -l

# 为/model/vehicle_blue/cmd_vel 创建桥接器
ros2 run ros_gz_bridge parameter_bridge /model/vehicle_blue/cmd_vel@geometry_msgs/msg/Twist]ignition.msgs.Twist

# 键盘控制节点
ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r /cmd_vel:=/model/vehicle_blue/cmd_vel

# lidar创建桥接器
ros2 run ros_gz_bridge parameter_bridge /lidar2@sensor_msgs/msg/LaserScan[ignition.msgs.LaserScan --ros-args -r /lidar2:=/laser_scan

turtlebot

安装

参考链接:https://turtlebot.github.io/turtlebot4-user-manual/software/turtlebot4_robot.html

git clone 慢

添加

https://ghfast.top/

javascript 复制代码
git clone https://github.com/turtlebot/turtlebot4_robot.git  -b humble
git clone https://ghfast.top/https://github.com/turtlebot/turtlebot4_robot.git  -b humble

turtlebot3

javascript 复制代码
gazebo 启动问题
export SVGA_VGPU10=0

export GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:/home/ly/.gazebo/models

# 设置TurtleBot3模型
export TURTLEBOT3_MODEL=burger

# 启动TurtleBot3 World环境
ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py

turtlebot4

javascript 复制代码
gazebo 启动问题
export SVGA_VGPU10=0

# 仿真launch
ros2 launch turtlebot4_ignition_bringup turtlebot4_ignition.launch.py 

# 键盘控制节点
ros2 run teleop_twist_keyboard teleop_twist_keyboard

虚拟机打不开共享文件夹

javascript 复制代码
sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
相关推荐
lohiecan7 小时前
梦丘MOS表情机器人固件
机器人
cdming9 小时前
微软Win11双AI功能来袭:“AI管家”+聊天机器人重构桌面交互体验
人工智能·microsoft·机器人
Lenz's law10 小时前
智元灵犀X1-本体通讯架构分析
机器人
万俟淋曦10 小时前
【论文速递】2025年第30周(Jul-20-26)(Robotics/Embodied AI/LLM)
人工智能·深度学习·ai·机器人·论文·robotics·具身智能
武子康17 小时前
AI-调查研究-106-具身智能 机器人学习数据采集工具和手段:传感器、API、遥操作、仿真与真人示教全流程
人工智能·深度学习·机器学习·ai·系统架构·机器人·具身智能
jerryinwuhan17 小时前
机器人模拟器(python)
开发语言·python·机器人
jerryinwuhan18 小时前
利用舵机实现机器人行走
人工智能·机器人
武子康18 小时前
AI-调查研究-107-具身智能 强化学习与机器人训练数据格式解析:从状态-动作对到多模态轨迹标准
人工智能·深度学习·机器学习·ai·系统架构·机器人·具身智能
沫儿笙18 小时前
KUKA库卡焊接机器人二氧化碳节气
人工智能·机器人
小猫挖掘机(绝版)20 小时前
kalibr进行相机内参以及相机imu的融合标定
ubuntu·无人机·slam·标定·vinsfusion