Coder Social home page Coder Social logo

yugajmera / navros_pkg Goto Github PK

View Code? Open in Web Editor NEW
48.0 3.0 12.0 8.11 MB

ROS Package for Autonomous Navigation for Differential drive robots

CMake 100.00%
autonomous-car autonomous-robots navigation autonomous-mobile-robots differential-drive-robots ros gazebo slam gmapping-slam amcl

navros_pkg's Introduction

NavRos

Autonomous Navigation for Differential Drive Robots

(Includes Gazebo simulation)

More information on the project : Blog post

Getting Started

  • cd catkin_ws/src
  • Clone this repo here : git clone "https://github.com/YugAjmera/navros_pkg"
  • cd .. (Go back to catkin_ws/)
  • catkin_make
  • source ./devel/setup.bash
  • source ~/.bashrc

If catkin_make fails (probably controller_manager package does not exist)

sudo apt-get install ros-kinetic-controller-manager

Gazebo Simulation

(Skip this while working with real robot)

Change the urdf file as per the dimensions of your robot.

Install pointcloud_to_laserscan :

sudo apt install ros-kinetic-pointcloud-to-laserscan ros-kinetic-rosbridge-server

On a new terminal :

To launch the urdf model in Gazebo in a custom cafe environment :

roslaunch navros_pkg cafe_custom.launch

To launch the model in empty world in Gazebo :

roslaunch gazebo_ros empty_world.launch
roslaunch navros_pkg urdf_gazebo_view.launch

Keep this terminal running for all the next steps.

Laser sensor (Lidar or Kinect)

On a new terminal :

Run RVIZ :

cd catkin_ws/src/navros_pkg/rviz 
rviz -d laser.rviz

Check if the laser readings are seen in RVIZ. After the laser readings are visible,close this terminal.

Mapping

On a new terminal :

Run SLAM :

roslaunch navros_pkg gmapping.launch

Run RVIZ :

cd catkin_ws/src/navros_pkg/rviz 
rviz -d map.rviz
  • For Octomap:
roslaunch navros_pkg octomap.launch

Run RVIZ for Octomap:

cd catkin_ws/src/navros_pkg/rviz 
rviz -d octomap.rviz

Run teleop_twist_keyboard :

rosrun teleop_twist_keyboard teleop_twist_keyboard.py 

Drive the robot around the environment you want to map.

Once mapping is complete, Save the map:

 rosrun map_server map_saver ~/catkin_ws/src/navros_pkg/maps/name_of_map

Now,close this terminal.

Autonomous Navigation

Define the size of your robot :

roscd navros_pkg/param/
gedit costmap_common_params.yaml 

footprint: [[-x, -y], [-x, y], [x, y], [x, -y]] where x= robot_length/2 and y= robot_width/2

Run amcl.launch :

Replace name_of_map with the map name you saved in the previous step.

roslaunch navros_pkg amcl.launch map:='name_of_map'

Run move_base.launch :

roslaunch navros_pkg move_base.launch 

Run RVIZ :

cd catkin_ws/src/navros_pkg/rviz 
rviz -d navigate.rviz
  • Set initial pose (Click "2D pose estimate" and pinpoint the approximate location of robot on map).
  • Red arrows indicate the probable location.
  • Set goal for the robot in RVIZ (Click "2D Nav goal" and pinpoint the desired goal on the map).
  • Green line indicates the path planned.

View work-flow here

navros_pkg's People

Contributors

yugajmera avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

navros_pkg's Issues

[ WARN] [1645239664.761739675]: Nothing to publish, octree is empty

Hi, thanks for your simulation, it is really helpful.

But I met a warning during the simulation, that the octree is empty, and there is nothing in my rviz octree. All other processes are running well. Can you give me an idea to solve it?

I am using Ubuntu 20.04 and ROS noetic.

Thank you in advance.

Kinect Sensor recognition

Hello Yug, Thanks for your great job. I have a question is How can you run "rosrun teleop_twist_keyboard teleop_twist_keyboard.py" without Gazebo simulation?I want to run the real robot and Kinect camera sensor, seems I can not run

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.