1、前记:此文希望是个正式的开始吧,掉进坑里已经很久了。(以下是Google论坛15年出的一个Topic,讨论的人就留下以下话题)。
(Q):Hello all,
Matlab 2015b has recently added ROS blocks in the Robotics Systems toolbox. These libraries have publish and subscribe blocks as well as get_param and set_param blocks. We are interested in using these blocks in Simulink to implement custom controllers in real time. We are able to subscribe to /robot/ref_joint_states to get the position, velocity, and torque as well as Baxter's internal clock time. However we are now trying to publish torques to Baxter's joints using Baxter's torque control mode. Some of the issues we are experiencing are synchronizing sampling rate between Simulinks clock, and Baxter's subscribe and publish blocks. Also we are trying to figure out what topic to publish the torque values calculated in Simulink to. We thought we'd start this thread to see if anyone has looked into controlling Baxter through Matlab Simulink like we are attempting and if there are any tips or pointers.
Thanks
Naji
(A):(回答通信的问题) MATLAB与Baxter机器人通信---网络环境配置篇,https://ww2.mathworks.cn/matlabcentral/answers/434933-cannot-connect-to-ros-master-and-connect-my-baxter-robot中有提到。
Hi YSF,
Please take these steps:
1) Turn off your Antivirus software in the Windows Machine.
2) Specify the IP address and hostname of your robot in the hosts file (C:\Windows\System32\drivers\etc). For example:
192.168.1.3 YOURROBOTHOSTNAME
3) Verify that you can ping the robot by its hostname. In the MATLAB Command Window type:
>> !ping YOURROBOTHOSTNAME
You should be able to get data and control Baxter from MATLAB/Simulink now.
Carlos Santacruz-Rosero, Ph.D.(BaxterCommWithSim是他写的)
MathWorks Robotics Team
2、安装Robotics Systems toolbox后就可以按照ROS的通信机制在MATLAB环境下做Baxter机器人的控制了。
ros通信可查:https://au.mathworks.com/help/robotics/examples/exchange-data-with-ros-publishers.html
https://au.mathworks.com/help/robotics/examples/call-and-provide-ros-services.html
https://au.mathworks.com/help/robotics/ug/ros-actions.html
然后通过订阅的方式获取右手图像:
如下:像素是真的差很多啊 :D
后面大概可以做图像处理的东西了,手势识别、、、基于手势的人机交互 etc。