[NotesToMyself] ROS client-server on different machines

assume that 192.168.0.100 is the server and 192.168.0.153 is the client with Matlab
console on the server:

export ROS_IP=192.168.0.100
export ROS_MASTER_URI=http://192.168.0.100:11311
roscore

(and same with rosrun turtlesim turtlesim_node on another console)

matlab:
setenv(‘ROS_MASTER_URI’,’http://192.168.0.100:11311′)
setenv(‘ROS_IP’,’192.168.0.153′)
rosinit
robotctrl = rospublisher( ‘/turtle1/cmd_vel’ )
robotpose = rossubscriber( ‘/turtle1/pose’ )

twist = rosmessage(robotctrl.MessageType)
twist.Linear.X = 1
send(robotctrl,twist)

pause(0.1)
state = receive( robotpose, 1 )

YARP, iCub on Slackware 14.2

Time for iCub! … shit. According to the icub manual:

CREATE_OPTIONAL_CARRIERS, set to ON 
 ENABLE_yarpcar_bayer_carrier, set to ON

ok, back to yarp/build/

make uninstall
cd .. && mkdir build2 && cd build2
cmake -DCREATE_GUIS=on -DCREATE_LIB_MATH=on -DCREATE_OPTIONAL_CARRIERS=on -DENABLE_yarpcar_bayer_carrier=on ../
make -j4
make install

Done, what now? Clone the repo, cmake:

 cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_icubmod_cartesiancontrollerclient=on -DENABLE_icubmod_cartesiancontrollerserver=on -DENABLE_icubmod_gazecontrollerclient=on ../

make -j4, make install and go through the tutorial to get it working! yarpserver in the background somewhere (until the end, it’s not gonna hang despite me great efforts) and …  Oh… shit…
Read more