# Obstacle_Avoidance_ROS
Project in action : [Watch on youtube](https://www.youtube.com/watch?v=wcXuUG4BWAU&t=9s)
## Cloning the project
Create a new directory in ```<catkin_workspace>/src/testbot_description``` and clone all of project files to that folder.
sample commands:
1. ```mkdir ~/catkin_ws/src/testbot_description```
2. ```cd ~/catkin_ws/src/testbot_description```
3. ```git clone https://github.com/vibhuthasak/Obstacle_Avoidance_ROS.git```
4. ```cd ~/catkin_ws```
5. ```catkin_make```
## Step by Step ROS Command Explanation
1. First you need to Launch the ROS node.
```roslaunch testbot_description testbot_gazebo.launch```
testbot_description is the package name that I gave. And testbot_gazebo.launch file can be found at /launch folder
After executing this command, Gazebo will open like below.
![alt text](https://github.com/vibhuthasak/Obstacle_Avoidance_ROS/blob/master/1.png)
**Everthing looking great so far right ?**
2. Now you need to run the python script that is created to listen sensor data from our virtual robot and move the robot.
```rosrun testbot_description sensor_data_listerner.py```
### Python Script Explanation in brief:
The python script is available at Obstacle_Avoidance_ROS/scripts/sensor_data_listener.py path.
The script is simply subcribes to ```/scan``` topic's ```sensor_msgs.msg.LaserScan``` message. The message is modified using the ```LaserScanProcess()``` function.
```rospy.Subscriber("scan", sensor_msgs.msg.LaserScan , LaserScanProcess)```
And it is publishing commands to ```/cmd_vel``` topic and the message type is Twist.
```pub = rospy.Publisher('/cmd_vel', Twist, queue_size=10)```
If you echo the ```/cmd_vel``` topic using following command
```rostopic echo cmd_vel```
You will see it is printing __Linear__ and __Angular__ velocities.
**DONE**
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
Obstacle_Avoidance_ROS 活动中的项目: 克隆项目 在<catkin>/src/testbot_description创建一个新目录,并将所有项目文件克隆到该文件夹中。 示例命令: mkdir ~/catkin_ws/src/testbot_description cd ~/catkin_ws/src/testbot_description git clone https://github.com/vibhuthasak/Obstacle_Avoidance_ROS.git cd ~/catkin_ws catkin_make 逐步ROS命令说明 首先,您需要启动ROS节点。 roslaunch testbot_description testbot_gazebo.launch testbot_description是我提供的软
资源详情
资源评论
资源推荐
收起资源包目录
Obstacle_Avoidance_ROS-master.zip (20个子文件)
Obstacle_Avoidance_ROS-master
worlds
assignment_world.world 25KB
rviz
view_nav.rviz 18KB
urdf.rviz 5KB
src
parser.cpp 415B
launch
load_urdf_into_rviz.launch 516B
teleop.launch 426B
testbot_gazebo.launch 1KB
1.png 127KB
package.xml 2KB
.github
FUNDING.yml 682B
scripts
sensor_data_listener.py 2KB
navigation.py 1KB
README.md 2KB
config
diffdrive.yaml 937B
joints.yaml 150B
testbot_control.yaml 1KB
urdf
my_robot_tutorial.urdf 8KB
my_robot.gv 1KB
my_robot.pdf 17KB
CMakeLists.txt 7KB
共 20 条
- 1
日月龙腾
- 粉丝: 27
- 资源: 4575
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1