launch file to run multiple nodes in two machines: problem with environment file
Hello all;
Following this good tutorial, link tutorial,
I have made a roslaunch file to start diferent nodes, locally and remotely in a Raspberry Pi. My launch file is:
<!-- at_robot_system.launch -->
<launch>
<machine name="at_robot_server" address="192.168.0.20" user="alberto" password="altella" env-loader="/home/alberto/at_robot_server_ros_env.sh"/>
<machine name="at_robot" address="192.168.0.21" user="pi" password="raspberry" env-loader="/home/pi/at_robot_ros_env.sh"/>
<group ns="at_robot_server">
<node machine="at_robot_server" pkg="at_robot_server" name="KeyController_node" type="KeyController" output="screen">
<param name="loop_rate" value="20" type="int"/>
<param name="up_key" value="56" type="int"/>
<param name="down_key" value="50" type="int"/>
<param name="left_key" value="52" type="int"/>
<param name="right_key" value="54" type="int"/>
</node>
<node machine="at_robot" name="image_view" pkg="image_view" type="image_view" respawn="false" output="screen">
<remap from="image" to="/image_raw"/>
<param name="autosize" value="true"/>
</node>
</group>
<group ns="at_robot">
<node machine="at_robot" pkg="uvc_camera" type="uvc_camera_node" name="uvc_camera" output="screen">
<param name="device" value="/dev/video0"/>
<param name="width" value="640"/>
<param name="height" value="480"/>
<param name="format" value="jpeg"/>
<param name="fps" value="30"/>
<param name="auto_focus" value="False"/>
<param name="focus_absolute" value="0"/>
</node>
<node machine="at_robot" pkg="at_robot" type="KeyControlClient_node" name="KeyControlClient" output="screen">
<param name="motor_motion_time" value="100" type="int"/>
</node>
</group>
</launch>
Both sections of the launch file work independently when launched locally. But running this launch file, I have the following error, which I can not understand, beacuse all the files exist and are checked with right persmissions:
alberto@alberto-pc:~$ roslaunch at_robot_server at_robot_system.launch
... logging to /home/alberto/.ros/log/99a32f48-a0f1-11e4-855a-080027cab213/roslaunch-alberto-VirtualBox-3229.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://192.168.0.20:52403/
remote[192.168.0.21-0] starting roslaunch
remote[192.168.0.21-0]: creating ssh connection to 192.168.0.21:22, user[pi]
launching remote roslaunch child with command: [env ROS_MASTER_URI=http://localhost:11311 /home/pi/at_robot_ros_env.sh roslaunch -c 192.168.0.21-0 -u http://192.168.0.20:52403/ --run_id 99a32f48-a0f1-11e4-855a-080027cab213]
remote[192.168.0.21-0]: ssh connection created
remote[192.168.0.21-0]: env: /home/pi/at_robot_ros_env.sh: No such file or directory
[192.168.0.21-0] process has died
remote roslaunch failed to launch: at_robot
alberto@alberto-pc:~$
My environment sh files are as follows:
#!/bin/sh
export ROS_IP=192.168.0.20
export ROS_MASTER_URI=http://localhost:11311
export ROSLAUNCH_SSH_UNKNOWN=1
. /home/alberto/at_robot_ws/devel/setup.sh
exec "@"
Is there any error? Would it be better to use bash?
Could anyone give a hint? Thank you very much in advance,
Alberto
I have used dos2unix tool with the sh files, just in case. Now I have this error:
What does it mean?