Ros learn to pay attention to points

Source: Internet
Author: User
Tags git commands

  1. Compilation issues
    1. The callback function cannot have a return type, and is written strictly according to the instance program
    2. The third party libraries question, packet.xml inside must add own dependent file
    3. There is a bit of a problem in the previous document.

      The main manifestation of this is that when you build a package, you write dependencies, and you don't need to write anymore.


      When you do not write or redefine a custom MSG, you must include it, and of course you do not need to add the standard without MSG. For example, the following Hello package




    From the above files, we can see that in Cmakelist, the configuration is

    Include and Lib. The Packg.xml is configured with a include<> header file.

    After adding MSG, you need to add the following message_generation and Message_runtime. Indicates that we are using MSG-generated header files.




  2. GIT-related issues

    Clone a new Git repository directly when all is not in the mix. There's new information in it, and then you use GIT commands inside.

    The main reference is Liaoche's website.





  1. Serial driver related



      1. Need to be aware when compiling

        In general, the downloaded serial driver is placed in the downloads directory

    Then change the information inside the makefile and install the software into the opt/serial.

    After installation, configure profile or BASHRC.



      1. Test serial port Attention point

    Take a look at the above command:

    We have a ls–l/dev/ttyusb* to view the USB port information. Some words will appear.

    We can go through echo "xxx" >/dev/ttyusb0.

    If the prompt permission is insufficient, we through sudo chmod 777/dev/ttyusb0 to fix.

    There is after inserting usb-serial, generally do not need to install serial port driver.


    1. Compiling program-related

      We find that every time we catkin_make, we change the serial port permissions again.

      and source Devel/setup.bash.


      The last point to note is that the path of the serial port must be/dev/ttyusb*.

      This must not be wrong.

    2. Problems in the actual sending process

      The delay time delay, otherwise the transmission speed too fast will have problems, receive is the same.

      Furthermore, we have found that currently only supports the writing and reading of string type data, and the char array currently has a null value.

      Actually get the number of strings, we use Str.size () to get.

    3. The custom structure in Ros does not have the Rostopic echo node to view the information and will error. Said it couldn't find Msg.

      For now, Ros seems to support only the output of the standard library's data format.

Ros learn to pay attention to points

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: 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.