ubuntu20配置baxter实机环境
安装教程
参考这个链接在ubuntu20.04下安装baxter环境
如何在gazebo和rviz上运行baxter机器人
还是参考上边博主Thank_Dan的另一篇文章。
出现问题 rosrun baxter_tools enable_robot.py -e 无法运行
报错如下:
[baxter - http://192.168.12.104:11311] cmm@xiugou:~/baxternoetic_ws$ rosrun baxter_tools enable_robot.py -e
[WARN] [1724434920.838342, 0.000000]: attempted to connect to non-local host [192.168.12.104] from a node launched with ROS_HOSTNAME=localhost
^CTraceback (most recent call last):
File “/home/cmm/baxternoetic_ws/src/baxter_tools/scripts/enable_robot.py”, line 86, in
sys.exit(main())
File “/home/cmm/baxternoetic_ws/src/baxter_tools/scripts/enable_robot.py”, line 66, in main
rs = baxter_interface.RobotEnable(CHECK_VERSION)
File “/home/cmm/baxternoetic_ws/src/baxter_interface/src/baxter_interface/robot_enable.py”, line 86, in init
baxter_dataflow.wait_for(
File “/home/cmm/baxternoetic_ws/src/baxter_interface/src/baxter_dataflow/wait_for.py”, line 59, in wait_for
rate.sleep()
File “/opt/ros/noetic/lib/python3/dist-packages/rospy/timer.py”, line 103, in sleep
sleep(self._remaining(curr_time))
File “/opt/ros/noetic/lib/python3/dist-packages/rospy/timer.py”, line 165, in sleep
raise rospy.exceptions.ROSInterruptException(“ROS shutdown request”)
rospy.exceptions.ROSInterruptException: ROS shutdown request
原因是因为rate.sleep()卡主,仿真时间的问题,用下边语句取消仿真时间即可
# 取消仿真时间
rosparam set use_sim_time false
开启仿真时间语句如下暂时用不到
# 设置使用仿真时间
rosparam set use_sim_time true
##结果
[baxter - http://192.168.12.104:11311] cmm@xiugou:~/baxternoetic_ws$ rosrun baxter_tools enable_robot.py -e
[INFO] [1724435558.570888]: Robot Enabled