Ros Entry-level learning (based on ubuntu16.04+kinetic)

Source: Internet
Author: User

Setup
Roscore # Making sure that we had roscore Runningrosrun Turtlesim turtlesim_noderosrun Turtlesim Turtle_teleop_key # now You can use the arrow keys in the keyboard to drive the turtle around.
ROS Topics
sudo Install ros-kinetic-rqtsudoinstall ros-kinetic-rqt-common-pluginsrosrun Rqt_graph Rqt_graph
Rostopic-echoturtle_teleop_key

Rostopic List-h # figure out what argument the list sub--V # displays a verbose list of topics to publish to and Subscribe to and their type
Rostopic Type/turtle1/cmd_vel  # You should get the message type of the topic:geometry_msgs/twistrosmsg show Geom Etry_msgs/twist # Look at the details of the  message using rosmsg
Using Rostopic Pub
# publishes data on to a topic, rostopic Pub [topic] [Msg_type] [Args]rostopic pub-1/turtle1/cmd_vel Geometry_msgs/twist--'[2.0, 0.0, 0.0]' '[0.0, 0.0, 1.8]'# publishes the velocity commands at a rate of1Hz on the Velocity topicrostopic pub/turtle1/cmd_vel Geometry_msgs/twist-r1--'[2.0, 0.0, 0.0]' '[0.0, 0.0, -1.8]'# now We can also look at what's happeninginchrqt_graph. # and see the data published by our TurtlesimrostopicEcho/turtle1/pose

# how fast theTurtlesim_nodeIs publishing/turtle1/pose, $ rostopic Hz [topic]
Rostopic Hz/turtle1/pose

# Get in depth information about a topic
Rostopic Type/turtle1/cmd_vel | Rosmsg Show
Using Rqt_plot
in/turtle1/pose//turtle1/pose/y and add it.

Ros Entry-level learning (based on ubuntu16.04+kinetic)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.