Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo 'appending kinect2_bridge launch to upstart file...'
- if [ -d "/etc/ros/groovy" ];
- then
- echo "groovy exists..."
- sudo sed -i 's:</launch>:\
- <machine name="pr2-head" address="pr2-head" user="pr2-head" password="clearpath" env-loader="/home/pr2-head/kinect_ws/devel/env.sh"/>\
- <node machine="pr2-head" pkg="kinect2_bridge" type="kinect2_bridge" name="kinect2_bridge">\
- \t<param name="publish_tf" value="true"/>\
- </node>\
- <node pkg="tf" type="static_transform_publisher" name="kinect2_transform" args="0 0 0 0 0 0 head_mount_kinect2_ir_optical_frame kinect2_link 300" />\
- \
- </launch>:i' /etc/ros/groovy/robot.launch
- fi
- if [ -d "/etc/ros/hydro" ];
- then
- echo "hydro exists..."
- sudo sed -i 's:</launch>:\
- <machine name="pr2-head" address="pr2-head" user="pr2-head" password="clearpath" env-loader="/home/pr2-head/kinect_ws/devel/env.sh"/>\
- <node machine="pr2-head" pkg="kinect2_bridge" type="kinect2_bridge" name="kinect2_bridge">\
- \t<param name="publish_tf" value="true"/>\
- </node>\
- <node pkg="tf" type="static_transform_publisher" name="kinect2_transform" args="0 0 0 0 0 0 head_mount_kinect2_ir_optical_frame kinect2_link 300" />\
- \
- </launch>:i' /etc/ros/hydro/robot.launch
- fi
- if [ -d "/etc/ros/indigo" ];
- then
- echo "indigo exists..."
- sudo sed -i 's:</launch>:\
- <machine name="pr2-head" address="pr2-head" user="pr2-head" password="clearpath" env-loader="/home/pr2-head/kinect_ws/devel/env.sh"/>\
- <node machine="pr2-head" pkg="kinect2_bridge" type="kinect2_bridge" name="kinect2_bridge">\
- \t<param name="publish_tf" value="true"/>\
- </node>\
- <node pkg="tf" type="static_transform_publisher" name="kinect2_transform" args="0 0 0 0 0 0 head_mount_kinect2_ir_optical_frame kinect2_link 300" />\
- \
- </launch>:i' /etc/ros/indigo/robot.launch
- fi
- sudo sed -i 's:</launch>:\
- <machine name="pr2-head" address="pr2-head" user="pr2-head" password="clearpath" env-loader="/home/pr2-head/kinect_ws/devel/env.sh"/>\
- <node machine="pr2-head" pkg="kinect2_bridge" type="kinect2_bridge" name="kinect2_bridge">\
- \t<param name="publish_tf" value="true"/>\
- </node>\
- <node pkg="tf" type="static_transform_publisher" name="kinect2_transform" args="0 0 0 0 0 0 head_mount_kinect2_ir_optical_frame kinect2_link 300" />\
- \
- </launch>:i' /etc/ros/robot.launch
- echo 'kinect2_bridge appended to upstart'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement