-
Notifications
You must be signed in to change notification settings - Fork 44
Description
I'm having trouble connecting to the robot with the CAN to USB adapter. I am using an Nvidia Jetson Orin Nano (arm processor) and Ubuntu 22.04. I installed all dependencies, and follow through the steps in README(EN).md, and this is what I see in my terminal. I made sure all cables were plugged in properly. The light at the base of the robot is blinking green, and the button on the last joint of the robot is off (I am not in imitation/replay mode). How can I resolve this issue?
我对使用 CAN 转 USB 适配器连接机器人的过程遇到了困难。我正在使用 Nvidia Jetson Orin Nano (ARM 处理器) 和 Ubuntu 22.04 操作系统。我已经安装了所有依赖项,并按照 README(EN).md 中的步骤进行操作,但在终端中我看到了以下信息。我已经确保所有电缆都已正确插入。机器人底座上的指示灯正在闪烁绿色,机器人末端关节上的按钮是熄灭的(我没有处于模仿/回放模式)。我该如何解决这个问题?
arnav@jetson:~$ cd piper_ros/
arnav@jetson:~/piper_ros$ bash find_all_can_port.sh
Both ethtool and can-utils are installed.
[sudo] password for arnav:
Interface can0 is connected to USB port c310000.mttcan
arnav@jetson:~/piper_ros$ bash can_activate.sh can0 1000000
-------------------START-----------------------
Both ethtool and can-utils are installed.
Expected to configure a single CAN module, detected interface can0 with corresponding USB address c310000.mttcan.
Interface can0 is not activated or bitrate is not set.
Interface can0 has been reset to bitrate 1000000 and activated.
-------------------OVER------------------------
arnav@jetson:~/piper_ros$ ifconfig
can0: flags=193<UP,RUNNING,NOARP> mtu 16
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 201
building and starting the node | 构建并启动 piper_single_ctrl:
Starting >>> piper_description
Starting >>> piper
Starting >>> piper_gazebo
Starting >>> piper_humble
Starting >>> piper_msgs
Starting >>> piper_mujoco
Finished <<< piper_description [0.84s]
Starting >>> piper_no_gripper_moveit
Finished <<< piper_gazebo [0.89s]
Starting >>> piper_with_gripper_moveit
Finished <<< piper_humble [0.94s]
Finished <<< piper_mujoco [0.96s]
Finished <<< piper_no_gripper_moveit [0.31s]
Finished <<< piper_with_gripper_moveit [0.27s]
Finished <<< piper_msgs [1.72s]
Finished <<< piper [2.38s]
Summary: 8 packages finished [3.20s]
arnav@jetson:~/piper_ros$ source install/setup.bash
arnav@jetson:~/piper_ros$ ros2 run piper piper_single_ctrl --ros-args -p can_port:=can0 -p auto_enable:=false -p gripper_exist:=true -p gripper_val_mutiple:=2
[INFO] [1761944807.736227371] [piper_ctrl_single_node]: can_port is can0
[INFO] [1761944807.737179520] [piper_ctrl_single_node]: auto_enable is False
[INFO] [1761944807.737924037] [piper_ctrl_single_node]: gripper_exist is True
[INFO] [1761944807.738617422] [piper_ctrl_single_node]: gripper_val_mutiple is 2
[ERROR] [1761944807.986698427] [piper_ctrl_single_node]: can0 is loss
[ERROR] [1761944807.988070638] [piper_ctrl_single_node]: exit...
Exception in thread Thread-4 (publish_thread):
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/arnav/piper_ros/install/piper/lib/python3.10/site-packages/piper/piper_ctrl_single_node.py", line 135, in publish_thread
rate.sleep()
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/timer.py", line 141, in sleep
self._presleep()
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/timer.py", line 116, in _presleep
raise ROSInterruptException()
rclpy.exceptions.ROSInterruptException: rclpy.shutdown() has been called
Traceback (most recent call last):
File "/home/arnav/piper_ros/install/piper/lib/piper/piper_single_ctrl", line 33, in <module>
sys.exit(load_entry_point('piper==0.0.0', 'console_scripts', 'piper_single_ctrl')())
File "/home/arnav/piper_ros/install/piper/lib/python3.10/site-packages/piper/piper_ctrl_single_node.py", line 434, in main
rclpy.shutdown()
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/__init__.py", line 130, in shutdown
_shutdown(context=context)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/utilities.py", line 58, in shutdown
return context.shutdown()
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/context.py", line 100, in shutdown
raise RuntimeError('Context must be initialized before it can be shutdown')
RuntimeError: Context must be initialized before it can be shutdown
[ros2run]: Process exited with failure 1
Here is a picture of my CAN connection | 这是我的 CAN 连接的图片。
