用rviz之前需要安装arbotix
在catkin_ws/src中
git clone https://github.com/vanadiumlabs/arbotix_ros.git
回到catkin_ws目录,用catkin_make
这样就安装好了arbotix
然后安装rbx_vol_1
在catkin_ws/src中
git clone https://github.com/pirobot/rbx1
同样回到catkin_ws目录,用catkin_make
编译结束用
roslaunch rbx1_bringup fake_pi_robot.launch
运行模拟机器人(别忘了roscore命令)
这时候是看不到的
再运行
rosrun rviz rviz -d `rospack find rbx1_nav`/sim.rviz
就可以看到小车仿真
这里的标点符号是左上角esc下面的 ` 而不是 ‘
这里可能会遇到一些问题,比如
Global Status Error
可以用
rosrun tf static_transform_publisher 0.0 0.0 0.0 0.0 0.0 0.0 map my_frame 100
source /path/to/your/catkin_ws/devel/setup.bash
https://www.cnblogs.com/yjqjy/p/10473566.html
最后的解决办法是在bashrc文件中把anaconda注释掉,同时把默认python改为2.7版本,才解决好。当然这不是最好的办法,将2.7和3.6分开,也涉及了pip和pip3,安装pip之前还要安装setuptools。具体可以参考
https://blog.csdn.net/weixin_38725737/article/details/81084153
原文:https://www.cnblogs.com/yjqjy/p/10476218.html