树莓派获取IP地址:ifconfig
ROS:192.168.101.18
192.168.101.255
PC端获取IP地址:ipconfig
PC端:192.168.101.7
vmvare虚拟机创建ros机器人链接:ssh clbrobot@robot,密码123456
Windows链接树莓派:F:\····\树莓派4B\4.配套辅助软件\FileZilla_win64.exe 安装
打开后——主机:192.168.101.18;用户名:clbrobot;密码:123456 端口:22
ssh clbrobot@robot
roslaunch clbrobot bringup.launch
打开新窗口
:sudo gedit ~/.bashrc //修改IP地址
source ~/.bashrc
rosrun rviz rviz //打开rviz界面
rviz -d name.rviz//打开指定文件
PC端虚拟机对树莓派关机:sudo halt
打开窗口1
:ssh clbrobot@robot1
roslaunch clbrobot bringup.launch
打开窗口2:
ssh clbrobot@robot1
roscd clbrobot/ 进入树莓派catkin_ws/src/clbrobot_projrct/clbrobot
cd param
cd imu
rostopic echo /imu/data
rosrun imu_calib do_calib
窗口1 :roslaunch clbrobot bringup.launch
窗口2 :rostopic echo /imu/data //校正到0
打开窗口1:
ssh clbrobot@robot1
roslaunch clbrobot bringup.launch
打开窗口2:
ssh clbrobot@robot1
rosrun rikirobot_nav calibrate_angular.py
窗口3:
rosrun rqt_reconfigure rqt_reconfigure
roscd clbrobot/
cd launch/
vi bringup.launch
打开窗口1:
ssh clbrobot@robot1
roslaunch clbrobot bringup.launch
打开窗口2:
ssh clbrobot@robot1
rosrun rikirobot_nav calibrate_angular.py
窗口3:
rosrun rqt_reconfigure rqt_reconfigure
剩余同角速度
打开窗口1:
ssh clbrobot@robot1
roslaunch clbrobot bringup.launch
打开窗口2:
ssh clbrobot@robot1
rosrun riki_pid pid_configure
窗口3 rosrun rqt_reconfigure rqt_reconfigure
4、
ssh clbrobot@robot1 //这一步多试试,看看需不需要进入树莓派,我是需要进入的
rosrun teleop_twist_keyboard teleop_twist_keyboard.py
打开窗口1:
ssh clbrobot@robot1
roslaunch clbrobot bringup.launch
打开窗口2:
ssh clbrobot@robot1
roslaunch clbrobot lidar_slam.launch
窗口3
rosrun rviz rviz
打开slam.rviz文件
窗口4
ssh clbrobot@robot1
rosrun teleop_twist_keyboard teleop_twist_keyboard.py
保存地图:
新建窗口:
ssh clbrobot@robot1
roscd clbrobot/
cd maps
./map.sh 显示保存完成
ls -l 查看是否完成更新
打开窗口1
:ssh clbrobot@robot1
roslaunch clbrobot bringup.launch
打开窗口2:
ssh clbrobot@robot1
roslaunch clbrobot lidar_slam.launch
窗口3
rosrun rviz rviz
打开slam.rviz文件
保存同上上
打开窗口1:
ssh clbrobot@robot1
roslaunch clbrobot bringup.launch
打开窗口2:
ssh clbrobot@robot1
roslaunch clbrobot auto_slam.launch
窗口3
rosrun rviz rviz
打开auto_slam.rviz文件
点击菜单栏publish point构建一个封闭的区域
注意不要来回走动,hector算法构建地图对雷达的扫描频率要求较高,需40HZ,此时雷达扫描频率只有10HZ,所以效果并不好
CSDN搜索hector SLAM算法学习与代码解析
打开窗口1:
ssh clbrobot@robot1
roslaunch clbrobot bringup.launch
打开窗口2:
ssh clbrobot@robot1
roslaunch clbrobot hector_slam.launch
窗口3
rosrun rviz rviz
打开slam.rviz文件
窗口4
ssh clbrobot@robot1 //这一步多试试,看看需不需要进入树莓派,此时没有进入
rosrun teleop_twist_keyboard teleop_twist_keyboard.py //线速度角速度都调到0.2
打开窗口1:
ssh clbrobot@robot1
roslaunch clbrobot bringup.launch
打开窗口2:
ssh clbrobot@robot1
roslaunch clbrobot karto_slam.launch
窗口3
rosrun rviz rviz
打开slam.rviz文件
窗口4
ssh clbrobot@robot1 //这一步多试试,看看需不需要进入树莓派,此时没有进入
rosrun teleop_twist_keyboard teleop_twist_keyboard.py //线速度角速度都调到0.2
打开窗口1:
ssh clbrobot@robot1
roslaunch clbrobot bringup.launch
打开窗口2:
ssh clbrobot@robot1
roslaunch clbrobot navigate.launch
窗口3
rosrun rviz rviz
打开navigate.rviz文件
打开窗口1:
ssh clbrobot@robot1
roslaunch clbrobot bringup.launch
打开窗口2:
ssh clbrobot@robot1
roslaunch clbrobot navigate_multi.launch
中间报错
ERROR: cannot launch node of type [robot_pose_publisher/robot_pose_publisher]: robot_pose_publisher
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/home/rikirobot/google_ws/src/cartographer_ros/cartographer_ros
ROS path [2]=/home/rikirobot/google_ws/install_isolated/share
ROS path [3]=/home/rikirobot/catkin_ws/src
ROS path [4]=/opt/ros/melodic/share
窗口3
rosrun rviz rviz
打开multi_goals.rviz文件
打开窗口1:
ssh clbrobot@robot1
roslaunch clbrobot bringup.launch
打开窗口2:
ssh clbrobot@robot1
roslaunch clbrobot camera.launch
打开窗口3:roslaunch riki_line_follower riki_line.launch
打开窗口1:
ssh clbrobot@robot1
roslaunch clbrobot bringup.launch
打开窗口2:
ssh clbrobot@robot1
roslaunch clbrobot camera.launch
[ WARN] [1591267991.839174289]: Camera calibration file /home/rikirobot/catkin_ws/src/camera_umd/uvc_camera/example.yaml not found.
打开窗口3:
ssh clbrobot@robot1
roslaunch riki_lidar_follower laser_follower.launch
报错:
Resource not found:rikirobot
The traceback for the exception was written to the log file
Resource not found: rikirobot
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/home/rikirobot/google_ws/src/cartographer_ros/cartographer_ros
ROS path [2]=/home/rikirobot/google_ws/install_isolated/share
ROS path [3]=/home/rikirobot/catkin_ws/src
ROS path [4]=/opt/ros/melodic/share
The traceback for the exception was written to the log file
出错无法跟随
安卓手机APP控制与图像传输
打开窗口1:
ssh clbrobot@robot1
roslaunch clbrobot bringup.launch
打开窗口2:
ssh clbrobot@robot1
roslaunch clbrobot appcamera.launch
右上角“+”创建新robot,localhost里填写树莓派的IP地址,IP地址查询见上。控制小车运动
安卓APP安装闪退后面的步骤无法进行,等解决闪退问题再继续