unitreerobotics / unitree_ros_to_real

102 stars 93 forks source link

A1 position_lcm example - Segmentation Fault #54

Closed thschafer closed 1 year ago

thschafer commented 1 year ago

Hello. I am trying to run the ROS position_mode example on the A1's onboard Raspberry Pi. I am using the following:

The LCM server seems to launch fine, but the position_lcm executable experiences a segmentation fault after pressing enter. Am I doing something wrong, or is this the state of A1's ROS support?

Terminal 1:

pi@raspberrypi:~$ roslaunch unitree_legged_real real.launch ctrl_level:=lowlevel
... logging to /home/pi/.ros/log/0e67a344-2ef8-11ed-9c0f-dca632882b4a/roslaunch-raspberrypi-5598.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://192.168.123.12:40269/

SUMMARY
========

PARAMETERS
 * /control_level: lowlevel
 * /firmwork: 3_2
 * /robot_name: a1
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES
  /
    node_lcm_server (unitree_legged_real/lcm_server_3_2)

auto-starting new master
process[master]: started with pid [5791]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 0e67a344-2ef8-11ed-9c0f-dca632882b4a
process[rosout-1]: started with pid [5804]
started core service [/rosout]
process[node_lcm_server-2]: started with pid [5814]
UDP Initialized. Port: 8080
LCM Initialized. Subscribe channel: LCM_Low_Cmd, Publish channel: LCM_Low_State
[Loop Start] named: UDP_Send, period: 2(ms), run at cpu: 3
[Loop Start] named: UDP_Recv, period: 2(ms), run at cpu: 3
[Loop Start] named: LCM_Recv, period: 2(ms), cpu unspecified
[Loop Start] named: control_loop, period: 2(ms), cpu unspecified

Terminal 2:

root@raspberrypi:/home/pi/catkin_ws/src/robots/descriptions/unitree_ros/unitree_legged_real# rosrun unitree_legged_real position_lcm
LCM Initialized. WARNING: Control level is set to LOW-level.
Make sure the robot is hung up.
Press Enter to continue...
Subscribe channel: LCM_Low_State, Publish channel: LCM_Low_Cmd
Segmentation fault
thschafer commented 1 year ago

Ok, the issue was user error. My catkin workspace had an unknown version of unitree_ros_to_real. Removing that, cleaning workspace, and rebuilding with a fresh unitree_ros_to_real v3.2.1 allowed runing without segmentation fault.