This repo has all the important ros commands.
cd <path to catkin_ws>
catkin_make
source devel/setup.bash
roscore
catkin_create_pkg <package-name> <dependencies>
For e.g.
catkin_create_pkg test rospy nav_msgs sensor_msgs
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>
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
rosrun gazebo_ros gazebo
rosrun rviz rviz
For setting up the entire tf_tree for visualization of robot model in RViZ
rosrun robot_state_publisher robot_state_publisher
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>
Installation
sudo apt-get install ros-melodic-slam-gmapping
Launch
roslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=gmapping
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
roslaunch turtlebot3_gazebo turtlebot3_house.launch
roslaunch turtlebot3_gazebo turtlebot3_empty_world.launch
roslaunch turtlebot3_gazebo turtlebot3_world.launch
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
rosrun map_server map_saver
Installation
sudo apt-get install ros-<rosdistro>-rosbridge-server
Check IP address
hostname -I
Launch
roslaunch rosbridge_server rosbridge_websocket.launch
Installation
sudo apt-get install ros-melodic-husky-*
Gazebo Launch
roslaunch husky_gazebo husky_empty_world.launch
roslaunch husky_gazebo husky_playpen.launch