ArduPilot / companion

Companion computer startup scripts and examples
GNU General Public License v3.0
104 stars 164 forks source link

Nvidia_TX1: add ros install scripts #18

Open rmackay9 opened 7 years ago

rmackay9 commented 7 years ago

This PR does the following:

peterbarker commented 7 years ago

On Mon, 6 Feb 2017, khancyr wrote:

sed -i -e "s/rgb/zed/rgb/g" ./zed_rtabmap.launch

I think you mispelt "perl".

khancyr commented 7 years ago

@peterbarker I noob so much at this (point click kid here ^^) ! So I will watch and learn if you got another solution

khancyr commented 7 years ago

About the launch, explicite use roslaunch isn't needed as the first .launch called will bring roscore up. I would recommand the use of a master roslaunch that launch everything needed and https://github.com/clearpathrobotics/robot_upstart to create clean auto launcher for ROS stuff !

vooon commented 7 years ago

I initially use robot_upstart, but then write my own upstart job: https://github.com/vooon/rarog/blob/master/rarog_configs/rpi2/rarog.conf And i believe, that systemd unit also should be simple (don't understand why people so love daemon-forking-magic while modern init can daemonize and track status without it).

Several run of roslaunch can be replaced with one bringup: https://github.com/vooon/rarog/blob/master/rarog_bringup/launch/robot_bringup.launch

E.g. something like that:

<launch>

<group ns="camera">
  <include file="$(find zed_wrapper)/launch/zed.launch" />
  <!-- node for static tf. but better to use urdf + robot_state_publisher -->
  <include file="$(find rtabmap_ros)/launch/zed_rtabmap.launch">
    <arg name="rtabmap_args" value="--delete_db_on_start" />
    <arg name="depth_topic" value="/camera/zed/depth/depth_registered" />
  </include>
</group>

<!-- other nodes, not in /camera -->
</launch>
khancyr commented 7 years ago

@vooon thanks for the inputs !! I don't understand if you like or not systemd ! but for me it seems simple for simple thing, so that good ! I point out robot_upstart as it takes plenty parameter (such as run as root, where to log etc.) and when you start ROS it is quite simple to understant how to use it (without digger into what is systemd, realized that you need to set permission, and finally that you need to use upstart of rc.local ...)

vooon commented 7 years ago

@khancyr my opinion, that upstart has better config (DSL, easier to understand), but other is common in both systems. And now major distros are use systemd anyway. Oh, as i see, robot_upstart now should be called robot_systemd :) But scripts looks same as before.