masuko-shingo / jetson-nano

自分用jetsonnanoの記録
MIT License
0 stars 0 forks source link

turtlebot3_bringupでエラーがでる  #5

Open masuko-shingo opened 3 years ago

masuko-shingo commented 3 years ago

目的

PCからJetsonnanoにssh通信でbringupを行い、turtlebot3を動かそうとした

現状

PCから

$roscore
$ssh jetsonnano@10.0.0.137

を実行し、Jetsonnnanoにssh通信

$roslaunch turtlebot3_bringup turtlebot3_robot.launch

結果

$roslaunch turtlebot3_bringup turtlebot3_robot.launch

... logging to /home/jetsonnano/.ros/log/7efac736-e551-11eb-9fe3-7c7635a4ab69/roslaunch-jetsonnano-desktop-10612.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://10.0.0.137:34561/

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.11
 * /turtlebot3_core/baud: 115200
 * /turtlebot3_core/port: /dev/ttyACM0
 * /turtlebot3_core/tf_prefix: 
 * /turtlebot3_lds/frame_id: base_scan
 * /turtlebot3_lds/port: /dev/ttyUSB0

NODES
  /
    turtlebot3_core (rosserial_python/serial_node.py)
    turtlebot3_diagnostics (turtlebot3_bringup/turtlebot3_diagnostics)
    turtlebot3_lds (hls_lfcd_lds_driver/hlds_laser_publisher)

ROS_MASTER_URI=http://10.0.0.68:11311

process[turtlebot3_core-1]: started with pid [10621]
process[turtlebot3_lds-2]: started with pid [10622]
process[turtlebot3_diagnostics-3]: started with pid [10623]
[ERROR] [1626342467.757634459]: An exception was thrown: open: No such file or directory
[turtlebot3_lds-2] process has died [pid 10622, exit code 255, cmd /opt/ros/melodic/lib/hls_lfcd_lds_driver/hlds_laser_publisher __name:=turtlebot3_lds __log:=/home/jetsonnano/.ros/log/7efac736-e551-11eb-9fe3-7c7635a4ab69/turtlebot3_lds-2.log].
log file: /home/jetsonnano/.ros/log/7efac736-e551-11eb-9fe3-7c7635a4ab69/turtlebot3_lds-2*.log
[INFO] [1626342468.375278]: ROS Serial Python Node
[INFO] [1626342468.416968]: Connecting to /dev/ttyACM0 at 115200 baud
[ERROR] [1626342468.436630]: Error opening serial: [Errno 13] could not open port /dev/ttyACM0: [Errno 13] Permission denied: '/dev/ttyACM0'
[ERROR] [1626342471.450782]: Error opening serial: [Errno 13] could not open port /dev/ttyACM0: [Errno 13] Permission denied: '/dev/ttyACM0'
[ERROR] [1626342474.727178]: Error opening serial: [Errno 13] could not open port /dev/ttyACM0: [Errno 13] Permission denied: '/dev/ttyACM0'
^C[turtlebot3_diagnostics-3] killing on exit
[turtlebot3_core-1] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
masuko-shingo commented 3 years ago

https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver/issues/38 を参考に、

$sudo chmod a+rw /dev/ttyACM0

を実行した後、再度bringup

結果

$roslaunch turtlebot3_bringup turtlebot3_robot.launch
... logging to /home/jetsonnano/.ros/log/09e74f06-e609-11eb-9d24-7c7635a4ab69/roslaunch-jetsonnano-desktop-10216.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://10.0.0.139:35613/

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.11
 * /turtlebot3_core/baud: 115200
 * /turtlebot3_core/port: /dev/ttyACM0
 * /turtlebot3_core/tf_prefix: 
 * /turtlebot3_lds/frame_id: base_scan
 * /turtlebot3_lds/port: /dev/ttyUSB0

NODES
  /
    turtlebot3_core (rosserial_python/serial_node.py)
    turtlebot3_diagnostics (turtlebot3_bringup/turtlebot3_diagnostics)
    turtlebot3_lds (hls_lfcd_lds_driver/hlds_laser_publisher)

ROS_MASTER_URI=http://10.0.0.68:11311

process[turtlebot3_core-1]: started with pid [10232]
process[turtlebot3_lds-2]: started with pid [10233]
process[turtlebot3_diagnostics-3]: started with pid [10234]
[ERROR] [1626421610.469440797]: An exception was thrown: open: Permission denied
[turtlebot3_lds-2] process has died [pid 10233, exit code 255, cmd /opt/ros/melodic/lib/hls_lfcd_lds_driver/hlds_laser_publisher __name:=turtlebot3_lds __log:=/home/jetsonnano/.ros/log/09e74f06-e609-11eb-9d24-7c7635a4ab69/turtlebot3_lds-2.log].
log file: /home/jetsonnano/.ros/log/09e74f06-e609-11eb-9d24-7c7635a4ab69/turtlebot3_lds-2*.log
[INFO] [1626421611.363909]: ROS Serial Python Node
[INFO] [1626421611.407485]: Connecting to /dev/ttyACM0 at 115200 baud
[INFO] [1626421613.536439]: Requesting topics...
[INFO] [1626421613.823650]: Note: publish buffer size is 1024 bytes
[INFO] [1626421613.830447]: Setup publisher on sensor_state [turtlebot3_msgs/SensorState]
[INFO] [1626421613.845376]: Setup publisher on firmware_version [turtlebot3_msgs/VersionInfo]
[INFO] [1626421614.075565]: Setup publisher on imu [sensor_msgs/Imu]
[INFO] [1626421614.091116]: Setup publisher on cmd_vel_rc100 [geometry_msgs/Twist]
[INFO] [1626421614.185780]: Setup publisher on odom [nav_msgs/Odometry]
[INFO] [1626421614.200207]: Setup publisher on joint_states [sensor_msgs/JointState]
[INFO] [1626421614.213947]: Setup publisher on battery_state [sensor_msgs/BatteryState]
[INFO] [1626421614.226899]: Setup publisher on magnetic_field [sensor_msgs/MagneticField]
[INFO] [1626421615.631526]: Setup publisher on /tf [tf/tfMessage]
[INFO] [1626421615.668399]: Note: subscribe buffer size is 1024 bytes
[INFO] [1626421615.680326]: Setup subscriber on cmd_vel [geometry_msgs/Twist]
[INFO] [1626421615.711043]: Setup subscriber on sound [turtlebot3_msgs/Sound]
[INFO] [1626421615.749682]: Setup subscriber on motor_power [std_msgs/Bool]
[INFO] [1626421615.782655]: Setup subscriber on reset [std_msgs/Empty]
[INFO] [1626421617.181258]: Setup TF on Odometry [odom]
[INFO] [1626421617.194231]: Setup TF on IMU [imu_link]
[INFO] [1626421617.205833]: Setup TF on MagneticField [mag_link]
[INFO] [1626421617.227938]: Setup TF on JointState [base_link]
[INFO] [1626421617.255025]: --------------------------
[INFO] [1626421617.268797]: Connected to OpenCR board!
[INFO] [1626421617.285493]: This core(v1.2.2) is compatible with TB3 Burger
[INFO] [1626421617.300717]: --------------------------
[INFO] [1626421617.315733]: Start Calibration of Gyro
[INFO] [1626421619.748298]: Calibration End
masuko-shingo commented 3 years ago

https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver/issues/36 このサイトはkineticの環境だが、似たようなエラーメッセージだったので参考にした。 実行しているコマンドがROBOTIS e-manual 14.8. ソフトウェアの更新 https://emanual.robotis.com/docs/en/platform/turtlebot3/faq/#faq のコマンドであったため、14.8. ソフトウェアの更新をそのまま行い、lidarのみのbringupを行った。

$ cd ~/catkin_ws/src
$ git clone https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver.git
$ git clone https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
$ git clone https://github.com/ROBOTIS-GIT/turtlebot3.git
$ cd ~/catkin_ws/src/turtlebot3
$ sudo rm -r turtlebot3_description/ turtlebot3_teleop/ turtlebot3_navigation/ turtlebot3_slam/ turtlebot3_example/
$ cd ~/catkin_ws/
$ rm -rf build/ devel/
$ cd ~/catkin_ws && catkin_make -j1

結果

$roslaunch turtlebot3_bringup turtlebot3_lidar.launch 
... logging to /home/jetsonnano/.ros/log/daa0a00e-e61b-11eb-9d24-7c7635a4ab69/roslaunch-jetsonnano-desktop-18171.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://10.0.0.140:38345/

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.11
 * /turtlebot3_lds/frame_id: base_scan
 * /turtlebot3_lds/port: /dev/ttyUSB0

NODES
  /
    turtlebot3_lds (hls_lfcd_lds_driver/hlds_laser_publisher)

ROS_MASTER_URI=http://10.0.0.68:11311

process[turtlebot3_lds-1]: started with pid [18184]
[ERROR] [1626431163.641726126]: An exception was thrown: open: Permission denied
[turtlebot3_lds-1] process has died [pid 18184, exit code 255, cmd /home/jetsonnano/catkin_ws/devel/lib/hls_lfcd_lds_driver/hlds_laser_publisher __name:=turtlebot3_lds __log:=/home/jetsonnano/.ros/log/daa0a00e-e61b-11eb-9d24-7c7635a4ab69/turtlebot3_lds-1.log].
log file: /home/jetsonnano/.ros/log/daa0a00e-e61b-11eb-9d24-7c7635a4ab69/turtlebot3_lds-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done