博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Making my own Autonomous Robot in ROS / Gazebo, Day 3: Sense the world
阅读量:5094 次
发布时间:2019-06-13

本文共 2776 字,大约阅读时间需要 9 分钟。

Day 3: Sense the world

We will show how to add sensors to our basic differential drive model. Once equipped with sensors, our robot will be sufficiently equipped to use the , which will enable it to move on its own!

Adding a camera

Let’s add some sensors to our robot. If you already created some environment, you can now see what it is, with the eyes of your robot. For this we have to add a camera plugin to our robot model. For that, two things are necessary, a link and the actual plugin.

Add a joint to connect the camera link in the main model file:

After that, add the camera link in the main model file :

And now add the plugin to the gazebo file:

Gazebo/Blue
30.0
1.3962634
800
800
R8G8B8
0.02
300
true
0.0
mybot/camera1
image_raw
camera_info
camera_link
0.07
0.0
0.0
0.0
0.0
0.0

Launch your simulation, and add some object in front of the robot. You can obtain the camera image as with any ROS compatible camera, by subscribing to the image topic. You can use the image_view tool to visualize it directly:

rosrun image_view image_view image:=/mybot/camera1/image_raw

Image view Tool ROS Gazebo

Visualisation with RViz

Rviz is one of these fantastic tools that will make you love ROS. It’s capable of visualizing many different kind of information in the same interface. To start rviz:

rosrun rviz rviz

At the bottom left of the window there is an “add” button which allows you to load visualization plugins. In the parameters of these plugins you generally have to define the topic name to which the plugin subscribes, this should be fairly straightforward. A Rviz configuration file is provided with the sources and started by default in the launch file.

Here is an example visualization with plugins for: the robot model, the 3D transforms TF, the camera Image, the odometry:

Rviz visualisation with ROS Gazebo

Reference

 

转载于:https://www.cnblogs.com/casperwin/p/7605725.html

你可能感兴趣的文章
CSS3 关系选择器 演示
查看>>
9.4笔记
查看>>
Java正则表达式实例详解
查看>>
hdu 5040 bfs
查看>>
VMD的相关命令(转载)
查看>>
百度搜索设置定位
查看>>
POJ 3669 简单BFS
查看>>
sqlalchemy 多对多关系
查看>>
EMC Documentum DQL整理(三)
查看>>
Nginx valid_referer 防盗链
查看>>
BZOJ3223 文艺平衡树
查看>>
HTML Button.onclick事件汇总
查看>>
mysql 开启binlog
查看>>
Java中多态的一些简单理解
查看>>
洛谷 1449——后缀表达式(线性数据结构)
查看>>
JZOJ 3.10 1539——三条直线
查看>>
[最小割][Kruskal] Luogu P5039 最小生成树
查看>>
Data truncation: Out of range value for column 'Quality' at row 1
查看>>
Dirichlet分布深入理解
查看>>
SQL 实战教程(八)
查看>>