GithubHelp home page GithubHelp logo

ros-commands's Introduction

ros-commands

This repo has all the important ros commands.

Setting up the workspace:

cd <path to catkin_ws>
catkin_make
source devel/setup.bash
roscore

Creating a package:

catkin_create_pkg <package-name> <dependencies>

For e.g.

catkin_create_pkg test rospy nav_msgs sensor_msgs

Running a file:

cd <path to folder containing the script>

Make an executable

chmod +x <script_name>

Edit Cmakelists also and add the script name:

install(PROGRAMS
scripts/filename
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
Run

./<script_name>

or

rosrun <package name> <script name>

Important for debugging:

To inspect what is being published on a topic:

rostopic echo /topicname

To view the rqt_graph

rosrun rqt_graph rqt_graph 

To view the tf_tree

rosrun rqt_tf_tree rqt_tf_tree

To view the statements passed using rospy.loginfo()

rostopic echo /rosout

Gazebo:

rosrun gazebo_ros gazebo

RViZ:

rosrun rviz rviz

For setting up the entire tf_tree for visualization of robot model in RViZ

rosrun robot_state_publisher robot_state_publisher

Turtlebot3:

Installation

sudo apt-get install ros-melodic-turtlebot3-*

Run this command before every turtlebot3 command to set the model. value can be waffle_pi, waffle, burger

export TURTLEBOT3_MODEL=<value>

SLAM Gmapping:

Installation

sudo apt-get install ros-melodic-slam-gmapping

Launch

roslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=gmapping

Navigation:

Installation

sudo apt-get install ros-melodic-dwa-local-planner

Launch

roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=<path to map file>

For e.g.

roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=/home/hardik/map.yaml

Launch in gazebo:

roslaunch turtlebot3_gazebo turtlebot3_house.launch
roslaunch turtlebot3_gazebo turtlebot3_empty_world.launch
roslaunch turtlebot3_gazebo turtlebot3_world.launch

Teleop Launch

roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch

Save a map created using SLAM:

rosrun map_server map_saver

Rosbridge suite launch:

Installation

sudo apt-get install ros-<rosdistro>-rosbridge-server

Check IP address

hostname -I

Launch

roslaunch rosbridge_server rosbridge_websocket.launch

Husky:

Installation

sudo apt-get install ros-melodic-husky-*

Gazebo Launch

roslaunch husky_gazebo husky_empty_world.launch
roslaunch husky_gazebo husky_playpen.launch

ros-commands's People

Contributors

hardik01shah avatar

Watchers

 avatar

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.