source ~/.bashrc # like sys append path
export TURTLEBOT3_MODEL=burger
cd ~/catkin_ws # the default workplace to store
catkin_make # make sure compile 100%
roslaunch <package_name> <launch_file>
is to launch a ROS program.
roscore # connect client with server
roslaunch turtlebot3_gazebo turtlebot3_empty_world.launch # initialize the gazebo world
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
roscd turtlebot3_teleop
Structures:
Get into the workspace's source folder catkin_ws/src/
, create the package via,
catkin_create_pkg my_package rospy
# format
# catkin_create_pkg <package_name> <package_dependencies>
rospack list | grep my_package
Without writing a script to control, we can use a command prompt to directly control action.
roscore
roslaunch hector_quadrotor_demo outdoor_flight_gazebo.launch
rosservice call /enable_motors "enable: true"
rostopic pub -r 10 /cmd_vel geometry_msgs/Twist '{linear: {x: 0, y: 0.0, z: 1.0}, angular: {x: 0.0,y: 0.0,z: 0.0}}' # publish topic
#rosrun teleop_twist_keyboard teleop_twist_keyboard.py # alternative to remotely control
mkdir -p ~/my_ws/src
cd ~/my_ws/
catkin_make
source devel/setup.bash