ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I added two lines to ~/.bashrc to make sure roscore has a predictable URI:
export ROS_IP=192.168.1.11
export ROS_MASTER_URI=http://192.168.1.11:11311
To connect in MATLAB:
% Run the rosmatlab setup scripts
mr = matlabroot;
rosmatlab_path = strcat(mr,'/toolbox/psp/rosmatlab/');
addpath(rosmatlab_path);
rosmatlab_SetPath;
rosmatlab_AddClassPath;
% Connect to roscore which should be running in a terminal
node = rosmatlab.node('MATLAB_NODE', '192.168.1.11', 11311);
% Subscribe to the 'state' topic to receive updates on the state.
% The message type is lyap_control/plant
subscriber = rosmatlab.subscriber('state', 'lyap_control/plant', 1, node);
2 | No.2 Revision |
I added two lines to ~/.bashrc to make sure roscore has a predictable URI:
export ROS_IP=192.168.1.11
export ROS_MASTER_URI=http://192.168.1.11:11311
To connect in MATLAB:
% Run the rosmatlab setup scripts
mr = matlabroot;
rosmatlab_path = strcat(mr,'/toolbox/psp/rosmatlab/');
strcat(matlabroot,'/toolbox/psp/rosmatlab/');
addpath(rosmatlab_path);
rosmatlab_SetPath;
rosmatlab_AddClassPath;
% Connect to roscore which should be running in a terminal
node = rosmatlab.node('MATLAB_NODE', '192.168.1.11', 11311);
% Subscribe to the 'state' topic to receive updates on the state.
% The message type is lyap_control/plant
subscriber = rosmatlab.subscriber('state', 'lyap_control/plant', 1, node);
3 | No.3 Revision |
I added two lines to ~/.bashrc to make sure roscore has a predictable URI:
export ROS_IP=192.168.1.11
export ROS_MASTER_URI=http://192.168.1.11:11311
To connect in MATLAB:
% Run the rosmatlab setup scripts
rosmatlab_path = strcat(matlabroot,'/toolbox/psp/rosmatlab/');
addpath(rosmatlab_path);
addpath([matlabroot '/toolbox/psp/rosmatlab/']);
rosmatlab_SetPath;
rosmatlab_AddClassPath;
% Connect to roscore which should be running in a terminal
node = rosmatlab.node('MATLAB_NODE', '192.168.1.11', 11311);
% Subscribe to the 'state' topic to receive updates on the state.
% The message type is lyap_control/plant
subscriber = rosmatlab.subscriber('state', 'lyap_control/plant', 1, node);
4 | No.4 Revision |
I added two lines to ~/.bashrc to make sure roscore has a predictable URI:
export ROS_IP=192.168.1.11ROS_IP=192.168.1.11 <== your computer's IP
export ROS_MASTER_URI=http://192.168.1.11:11311
To connect in MATLAB:
% Run the rosmatlab setup scripts
addpath([matlabroot '/toolbox/psp/rosmatlab/']);
rosmatlab_SetPath;
rosmatlab_AddClassPath;
% Connect to roscore which should be running in a terminal
node = rosmatlab.node('MATLAB_NODE', '192.168.1.11', 11311);
% Subscribe to the 'state' topic to receive updates on the state.
% The message type is lyap_control/plant
subscriber = rosmatlab.subscriber('state', 'lyap_control/plant', 1, node);