Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8.3)
project(m2wr_description)
project(obstacle_avoidance_bot)

## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Xacro is used in the project to clean the URDF code.
2. Run `catkin_make`
3. Go to obstacle-avoid.py and make it executable using `chmod +x obstacle_avoidance.py`. No need to do this step if you are using the obstacle-avoid.cpp code.
3. Open 3 Terminals
4. Run the command `roslaunch Obstacle-Avoidance-Bot-Using-ROS spawn.launch`.
5. In the second terminal run the command `rosrun Obstacle-Avoidance-Bot-Using-ROS obstacle_avoidance.py` or `rosrun Obstacle-Avoidance-Bot-Using-ROS obstacle_avoidance.cpp`
4. Run the command `roslaunch obstacle_avoidance_bot spawn.launch`.
5. In the second terminal run the command `rosrun obstacle_avoidance_bot obstacle_avoidance.py` or `rosrun obstacle_avoidance_bot obstacle_avoidance.cpp`
6. In last terminal, run the command `rosrun gazebo_ros gazebo --verbose` to start the robot and begin the obstacle avoidance course.
7. Add blocks in between wherever you want or you can download a world from anywhere else and spawn the bot there.

Expand Down
4 changes: 2 additions & 2 deletions launch/rviz.launch
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<launch>
<arg name="gui" default="true" />

<arg name="model" default="$(find m2wr_description)/urdf/bot_description.xacro"/>
<arg name="model" default="$(find obstacle_avoidance_bot)/urdf/bot_description.xacro"/>

<param command="$(find xacro)/xacro '$(find m2wr_description)/urdf/bot_description.xacro'" name="robot_description"/>
<param command="$(find xacro)/xacro '$(find obstacle_avoidance_bot)/urdf/bot_description.xacro'" name="robot_description"/>

<!-- <arg name="rvizconfig" default="$(find urdf_tutorial)/rviz/urdf.rviz" /> -->

Expand Down
4 changes: 2 additions & 2 deletions launch/spawn.launch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<param command="$(find xacro)/xacro '$(find m2wr_description)/urdf/bot_description.xacro'" name="robot_description"/>
<param command="$(find xacro)/xacro '$(find obstacle_avoidance_bot)/urdf/bot_description.xacro'" name="robot_description"/>

<arg name="x" default="0"/>
<arg name="y" default="0"/>
Expand All @@ -9,4 +9,4 @@
<node name="mybot_spawn" pkg="gazebo_ros" type="spawn_model" output="screen"
args="-urdf -param robot_description -model bot_description -x $(arg x) -y $(arg y) -z $(arg z)" />

</launch>
</launch>
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<package format="2">
<name>m2wr_description</name>
<name>obstacle_avoidance_bot</name>
<version>0.0.0</version>
<description>The m2wr_description package</description>

Expand Down
10 changes: 5 additions & 5 deletions urdf/bot_description.xacro
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" ?>
<robot name="m2wr" xmlns:xacro="https://www.ros.org/wiki/xacro" > <!-- this second parameter is importent to make this file a valid xacro file -->
<robot name="m2wr" xmlns:xacro="https://www.ros.org/wiki/xacro" > <!-- this second parameter is important to make this file a valid xacro file -->

<!-- in rviz red - x | green - y | blue -z -->

<!-- while using odom tf do not forget to do rosparam set use_sim_time true as this gives all simulations the same time -->


<xacro:include filename="$(find m2wr_description)/urdf/material.xacro" />
<xacro:include filename="$(find m2wr_description)/urdf/gazebo.xacro" />
<xacro:include filename="$(find m2wr_description)/urdf/link_joint.xacro" />
<xacro:include filename="$(find obstacle_avoidance_bot)/urdf/material.xacro" />
<xacro:include filename="$(find obstacle_avoidance_bot)/urdf/gazebo.xacro" />
<xacro:include filename="$(find obstacle_avoidance_bot)/urdf/link_joint.xacro" />


<link name="link_chassis">
Expand Down Expand Up @@ -75,4 +75,4 @@
<!-- Create joint left -->
<xacro:joint_wheel name="joint_left_wheel" param_xyz="-0.05 -0.3 0" child="link_left_wheel" />

</robot>
</robot>