First run the roscore command in the virtual machine to start the master node
# 首先打开小乌龟进行
roscore
# 打开小乌龟进程节点
rosrun turtlesim turtlesim_node
# 启动键盘遥控
rosrun trutlesim turtle_teleop_key
# 以上两个节点,1个master已经启动完成
Commonly used graphical tools under ros:
1. rqt_graph displays the subscription relationship between node nodes
2. rqt_plot can be used to display information about the movement of the turtle, such as linear velocity and angular velocity.
Install the camera on the virtual machine:
player->removable device->KYE iSlim 2000AF v2->connected and disconnected from the host.
Then install the toolkit under ros
sudo apt install ros-melodic-uvc-camera
//The installation tool package under ros follows certain rules: ros-version number-function package name
After installation, run his worker node:
rosrun uvc_camera uvc_camera_ndoe //He will start the camera node and publish related topics
Open a terminal to verify:
rostopic list //View the current topic list, there is /image_row topic at this time,
Use rostopic echo /image_raw to output, showing the character format.
3. rqt_image_view (subscription topic) select the topic to display, select the /image_raw topic, and you can see the camera image displayed in the visualization tool.
使用roslaunch uvc_camera uvc_camera.launch
Function package name launch file name
Use roslaunch to start the topic, and use roslaunch to run the node. It will first check whether there is a master node. If there is already a master node, it will directly start the topic. If not, it will automatically start a master node.
Use rosrun rqt_ +tab keys to view all rqt tools
First start roslaunch uvc_camera camera_node.launch camera node
Then start the rviz visualization tool (images, maps, odometry, and point clouds can all be displayed)