yuzhenning / ROS_turtlebot2

This is a file record Ubuntu based ROS and Turtlebot2 control system
0 stars 0 forks source link

18-2 CP210x drivers and kernel for Jetson GPU #25

Open yuzhenning opened 4 years ago

yuzhenning commented 4 years ago

**Question: Cannot find rplidar in ttyUSB*** Running rplidar on Tk1,but, cannot found ttyUSB0! https://blog.csdn.net/sinat_31135199/article/details/52902744 CP210x驱动没有在L4T内核中组建,但是其已经在L4T内核资源树种。所以,我们需要添加cp210x驱动 The question is similar with my turtlebot2. We can try to solve the problem in this way. But, the question in web is based on TK1, but my computer is Jetson TX1

Solution: a. Install CP210x driver, b. Build kernel, c. Check insmod A. First choice is from Jetsonhacks:

  1. buildJetsonTK1Kernel : http://www.jetsonhacks.com/2016/06/29/build-custom-kernel-nvidia-jetson-tk1/ https://github.com/jetsonhacks/buildJetsonTK1Kernel

  2. buildJetsonTX1Kernel : https://www.jetsonhacks.com/2018/04/21/build-kernel-and-modules-nvidia-jetson-tx1/ https://github.com/jetsonhacks/buildJetsonTX1Kernel

  3. buildJetsonTX2Kernel : https://www.jetsonhacks.com/2017/03/25/build-kernel-and-modules-nvidia-jetson-tx2/ https://github.com/jetsonhacks/buildJetsonTX2Kernel

B. Following the TX1FTDIModule install procedure: https://blog.csdn.net/abc869788668/article/details/78296509 https://github.com/jetsonhacks/TX1FTDIModule

yuzhenning commented 4 years ago

General Procedure: (TX1 as example)

  1. git clone : $ git clone https://github.com/jetsonhacks/buildJetsonTX1Kernel.git

  2. cd to clone document $ cd buildJetsonTX1Kernel

  3. running (./) get kernel source.sh file $ ./getKernelSources.sh

  4. Fix version information (important) $ cd /usr/src/kernel (in some solution, actual address is : /usr/src/kernel/kernel-4.4) $ sudo gedit .config replace LOCALVERSION by cmd $ uname -r result (TX1 is 4.4.38-tegra)

  5. return to 1st terminal ( location : buildJetsonTX1Kernel ) And build kernel $ ./buildKernel.sh Address: Device Drivers -> USB Support -> USB Serial Converter Support
    Choice : CP210x Save and copy image $ ./copyzImage.sh

  6. running make kernel.sh file

  7. running copyimage.sh file

yuzhenning commented 4 years ago

Tips 1. install cp210x.ko to insmod

In jetson TX1, initial includes file: cp210x.ko in address: /usr/src/kernel/drivers/usb/serial/ we can try to install by : $ sudo insmod cp210x.ko check the install result by: $ lsmod

yuzhenning commented 4 years ago

Tips 2. check Jetson Version is very important !!!

Check version command $ uname -r jetson TX1 is : 4.4.38-tegra

yuzhenning commented 4 years ago

Tips 3. After install ttyUSB cp210x driver

please re-gedit rplidar_ros launch files. Expecially the rplidar ros launch files. 1. rules file ~/etc/udev/rules.d/rplidar.rules/rplidar.rules 2. rplidar files workspace

~/turtlebot_ws/src/rplidar_ros/launch/rplidar.launch
~/turtlebot_ws/src/turtlebot_apps/turtlebot_navigation/laser/driver/rplidar_laser.launch
~/turtlebot_ws/src/turtlebot_apps/turtlebot_navigation/launch/rplidar_gmapping_demo.launch
~/turtlebot_ws/src/turtlebot_apps/turtlebot_navigation/launch/includes/gmapping/rplidar_gmapping.launch.xml