Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nvidia_TX1: add ros install scripts #18

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rmackay9
Copy link
Contributor

@rmackay9 rmackay9 commented Feb 4, 2017

This PR does the following:

  • modifies the zed camera setup to download the setup package from my dropbox account. This is a temporary measure until I can figure out why we are unable to download the package from stereolabs.com
  • adds new ros install and startup scripts. These are far from perfect but they generally work.


# install ros
sudo apt-get install -y ros-kinetic-ros-base python-rosinstall ros-kinetic-mavros ros-kinetic-rtabmap-ros ros-kinetic-robot-state-publisher
sudo c_rehash /etc/ssl/certs
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that really needed? (maybe tx1 specific ?)

# create workspace
# Note: this seems to fail because some ROS variables are not being set
cd ~/catkin_zed/src
/opt/ros/kinetic/bin/catkin_init_workspace
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't really need normally, the first call of catkin_make will init the workspace


# kill src directory and build again
rm -rf ~/catkin_zed/src
mkdir -p ~/catkin_zed/src
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this look strange

Copy link
Contributor Author

@rmackay9 rmackay9 Feb 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's strange that we need to do the make twice but the first time around the make always fails. I have no idea why at this moment and neither does Dan Pollock..

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can understand that catkin_make failed due to missing dependencies, or non-generated msg before need, remove the src shouldn't make a difference !
I don't have the hardware to test ... so I will thrust you on that. I make only general comments ! ^^

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I turned that into Stereolabs. They said they would fix in the next release. Its something in either the build or devel directories that get built the first time through. If you save those off from a good build and add them to a new workspace before you try and build it the build will succeed first time through.

cd ~/catkin_zed/src
/opt/ros/kinetic/bin/catkin_init_workspace
cd ~/catkin_zed
/opt/ros/kinetic/bin/catkin_make
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

normally, catkin_make should be accessible directly since the setup.bash has been sourced

popd

# cp zed_rtabmap_launch file to /opt/ros/kinetic/share/rtabmap_ros/launch
sudo cp ./zed_rtabmap.launch /opt/ros/kinetic/share/rtabmap_ros/launch
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

roscp rtabmap_ros rtabmap.launch ./zed_rtabmap.launch

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haa understand! you are on the otherside ... well in fact you don't need to be in a workspace to call a .launch . Just roslaunch PATH_TO_FILE/zed_rtabmap.launch will work!

# cd to /opt/ros/kinetic/share/rtabmap_ros/launch
# sudo cp /opt/ros/kinetic/share/rtabmap_ros/launch/rtabmap.launch /opt/ros/kinetic/share/rtabmap_ros/launch/zed_rtabmap.launch
# sudo vi /opt/ros/kinetic/share/rtabmap_ros/launch/zed_rtabmap.launch
# replace "/camera/rgb" with "/camera/zed/rgb"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this step is missing ! something like maybe
sed -i -e "s/rgb/zed/rgb/g" ./zed_rtabmap.launch

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this is not needed

@peterbarker
Copy link
Contributor

peterbarker commented Feb 6, 2017 via email

@khancyr
Copy link

khancyr commented Feb 6, 2017

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

@khancyr
Copy link

khancyr commented Feb 6, 2017

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
Copy link

vooon commented Feb 6, 2017

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
Copy link

khancyr commented Feb 6, 2017

@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
Copy link

vooon commented Feb 6, 2017

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants