open-rdc / turtlebot3_jetson_nano

0 stars 0 forks source link

OpenCRのセットアップ ファームウェアのアップロードに失敗する #1

Closed masuko-shingo closed 3 years ago

masuko-shingo commented 3 years ago

目的

RaspberryPiで一度セットアップを行ったOpenCRをJetsonnanoで動かすため、 JetsonnanoからOpenCRにファームウェアをアップロードする

現状

ROBOTIS e-manual https://emanual.robotis.com/docs/en/platform/turtlebot3/opencr_setup/#opencr-setup を参考に、OpenCRのセットアップをしていました。 OpenCR setup の5. の項目、

$cd ./opencr_update
$./update.sh $OPENCR_PORT $OPENCR_MODEL.opencr

まで実行したところ、以下のような結果になりました。

結果

MODEL.opencr
aarch64
arm
OpenCR Update Start..
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
opencr_ld_shell ver 1.0.0
opencr_ld_main 
[  ] file name      : burger.opencr 
[  ] file size      : 178 KB
[  ] fw_name        : burger 
[  ] fw_ver         : 1.2.2 
ser_open: unable to open port: Permission denied
Fail to open port 1 : /dev/ttyACM0
[NG] Fail to jump to boot
[  ] file name      : burger.opencr 
[  ] file size      : 178 KB
[  ] fw_name        : burger 
[  ] fw_ver         : 1.2.2 
ser_open: unable to open port: Permission denied
Fail to open port 1 : /dev/ttyACM0
[NG] Fail to jump to boot
[  ] file name      : burger.opencr 
[  ] file size      : 178 KB
[  ] fw_name        : burger 
[  ] fw_ver         : 1.2.2 
ser_open: unable to open port: Permission denied
Fail to open port 1 : /dev/ttyACM0
[NG] Fail to jump to boot

アップロードに失敗した際、e-manualにOpenCRをリカバリモードにして再度アップロードするとあったので、 リカバリモードで再度試しましたたが、メッセージは変わりませんでした。

masuko-shingo commented 3 years ago

https://stackoverflow.com/questions/53825857/error-ld-so-object-libgtk3-nocsd-so-0-from-ld-preload-cannot-be-preloaded を参考に、 .bashrcファイルに

export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0

を追加

$sudo apt install gtk3-nocsd

をインストールした後

$cd ./opencr_update
$./update.sh $OPENCR_PORT $OPENCR_MODEL.opencr

を再度実行

結果

MODEL.opencr
aarch64
arm
OpenCR Update Start..
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
opencr_ld_shell ver 1.0.0
opencr_ld_main 
[  ] file name      : burger.opencr 
[  ] file size      : 178 KB
[  ] fw_name        : burger 
[  ] fw_ver         : 1.2.2 
ser_open: unable to open port: Permission denied
Fail to open port 1 : /dev/ttyACM0
[NG] Fail to jump to boot
[  ] file name      : burger.opencr 
[  ] file size      : 178 KB
[  ] fw_name        : burger 
[  ] fw_ver         : 1.2.2 
ser_open: unable to open port: Permission denied
Fail to open port 1 : /dev/ttyACM0
[NG] Fail to jump to boot
[  ] file name      : burger.opencr 
[  ] file size      : 178 KB
[  ] fw_name        : burger 
[  ] fw_ver         : 1.2.2 
ser_open: unable to open port: Permission denied
Fail to open port 1 : /dev/ttyACM0
[NG] Fail to jump to boot

また、

$source ~/.bashrc

を実行していなかったため、実行したところ

ERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

というエラーメッセージが出た。

yasuohayashibara commented 3 years ago

ser_open: unable to open port: Permission denied Fail to open port 1 : /dev/ttyACM0

パーミッションのエラーが発生しているので,以下を確認してください.

あと,そもそもの問題として,

masuko-shingo commented 3 years ago

試しに、

$ roslaunch turtlebot3_bringup turtlebot3_robot.launch

を行ったところ、

$ roslaunch turtlebot3_bringup turtlebot3_robot.launch
... logging to /home/jetsonnano/.ros/log/daa0a00e-e61b-11eb-9d24-7c7635a4ab69/roslaunch-jetsonnano-desktop-18728.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:41901/

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 [18737]
process[turtlebot3_lds-2]: started with pid [18738]
process[turtlebot3_diagnostics-3]: started with pid [18739]
[ERROR] [1626432013.310271470]: An exception was thrown: open: Permission denied
[turtlebot3_lds-2] process has died [pid 18738, 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-2.log].
log file: /home/jetsonnano/.ros/log/daa0a00e-e61b-11eb-9d24-7c7635a4ab69/turtlebot3_lds-2*.log
[INFO] [1626432014.150844]: ROS Serial Python Node
[INFO] [1626432014.210893]: Connecting to /dev/ttyACM0 at 115200 baud
[INFO] [1626432016.346407]: Requesting topics...
[INFO] [1626432016.479972]: Note: publish buffer size is 1024 bytes
[INFO] [1626432016.486938]: Setup publisher on sensor_state [turtlebot3_msgs/SensorState]
[INFO] [1626432016.506507]: Setup publisher on firmware_version [turtlebot3_msgs/VersionInfo]
[INFO] [1626432016.947802]: Setup publisher on imu [sensor_msgs/Imu]
[INFO] [1626432016.970857]: Setup publisher on cmd_vel_rc100 [geometry_msgs/Twist]
[INFO] [1626432017.073647]: Setup publisher on odom [nav_msgs/Odometry]
[INFO] [1626432017.088883]: Setup publisher on joint_states [sensor_msgs/JointState]
[INFO] [1626432017.103172]: Setup publisher on battery_state [sensor_msgs/BatteryState]
[INFO] [1626432017.122962]: Setup publisher on magnetic_field [sensor_msgs/MagneticField]
[INFO] [1626432018.489767]: Setup publisher on /tf [tf/tfMessage]
[INFO] [1626432018.529524]: Note: subscribe buffer size is 1024 bytes
[INFO] [1626432018.541931]: Setup subscriber on cmd_vel [geometry_msgs/Twist]
[INFO] [1626432018.579450]: Setup subscriber on sound [turtlebot3_msgs/Sound]
[INFO] [1626432018.613958]: Setup subscriber on motor_power [std_msgs/Bool]
[INFO] [1626432018.643465]: Setup subscriber on reset [std_msgs/Empty]
[INFO] [1626432019.727980]: Setup TF on Odometry [odom]
[INFO] [1626432019.739877]: Setup TF on IMU [imu_link]
[INFO] [1626432019.752570]: Setup TF on MagneticField [mag_link]
[INFO] [1626432019.767986]: Setup TF on JointState [base_link]
[INFO] [1626432019.788374]: --------------------------
[INFO] [1626432019.801784]: Connected to OpenCR board!
[INFO] [1626432019.817645]: This core(v1.2.2) is compatible with TB3 Burger
[INFO] [1626432019.832843]: --------------------------
[INFO] [1626432019.843829]: Start Calibration of Gyro
[INFO] [1626432022.292728]: Calibration End
^C[turtlebot3_diagnostics-3] killing on exit
[turtlebot3_core-1] killing on exit
[INFO] [1626432040.831744]: Send tx stop request
shutting down processing monitor...
... shutting down processing monitor complete
done

OpenCRに接続できていると思うので、問題ではなくなったかと思います。 また、

$ ls /dev/ttyacm0

で、/dev/ttyacm0が存在することは確認でき、

$ sudo chmod 777 /dev/ttyacm0

を実行しました。 bringupでエラーが出ていますが、これは別のissueを立てようと思います。