Cannot connect to ROS master and connect my Baxter robot...
5 ビュー (過去 30 日間)
古いコメントを表示
Hi,i am a Chinese student and ye here again.
Recently,I got some problem and I have seen similar problems and solutions ,but the problem still a problem.
Accoding to
What i have done are as follows:
in matlab :
in my hosts file from C:\Windows\System32\drivers\etc.
and also i have the toolbox ,the firewall is closed .i download the communicator class from web,the code named StartHere_ExampleScript.m are as follows :
and it can connect my virtual machine ROS master ip 192.168.1.129,so i decide to connect my real Baxter robot ,but it is failed. ^--^//
So, I really need help to solve this problem. Then I can continue to learn and study the baxter robot.
Can you help me if you have solved a similar problem? I really appreciate your help.
Best wishes!
StartHere_ExampleScript - Script to test Baxter Communicator class
% Notes:
% 0) Execute this script section by section
% 1) If you are running on a laptop, you might need to disable your
% antivirus software.
% 2) Make sure to turn on Baxter with the E-Stop released.
% 3) This script will DISABLE Baxter's Collision Avoidance
% 4) Baxter's IP should be declared in the hosts file in C:\Windows\System32\drivers\etc
% 5) check that your antivirus is off and E-Stop is disabled
% Copyright 2017 The MathWorks, Inc
%% Connect to ROS MASTER
% Change '011310P0010.local' to your Baxter's hostname
% NodeHost should be the IP address of your laptop or host machine
% rosinit('011310P0010.local','NodeHost','192.168.244.129')
%% Create object of Baxter Communicator class
% To connect to hardware:
% for hardware
rosinit('011602P0019.local','NodeHost','192.168.1.128')
%%
% To connect to simulation:
%bc = BaxterCommWithSim(true); % for simulation
%rosinit('192.168.1.129')
%% Turn on Servos
enable(bc);
%% Start timer to periodically update the joint commands
%baxterStartTimerForRobot;
baxterStartTimerForSim;
%% Untuck both arms
untuck(bc, 3);
...............
0 件のコメント
採用された回答
Cam Salzberger
2018 年 12 月 10 日
Hey John,
Sorry, I just was answering your other question with general strategies, but it looks like you've at least tried some of them here.
The thing that really stands out is that you've indicated that your computer (that's running MATLAB) has IP address 192.168.1.128. You are also trying to connect to the ROS Master computer at that hostname, but your hosts files shows it resolves to the same IP. If that hostname is supposed to go to the Baxter, then you need the Baxter's IP address in the hosts file, not your own computer's.
If that is the Baxter's IP address, then you should not be setting that to the ROS_IP environment variable or using it as the NodeHost argument.
-Cam
3 件のコメント
Cam Salzberger
2018 年 12 月 10 日
Hey John,
I haven't personally used Baxter, but based on a quick skim of their network information page, it seems like Baxter should be advertising its own hostname to IP address resolution over the network. So, if you manually added that address to your hosts file, maybe removing it will allow your computer to recognize the SERIAL.local hostname to resolve to the correct IP. You'll probably need to restart your computer (and possibly Baxter?) after removing that line from hosts though.
-Cam
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Network Connection and Exploration についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!