Power supply
Peripheral
Flash SD Card
sudo apt update
sudo apt upgrade -y
Install PIP
sudo apt install python-pip -y
Installing ROS from source
We will be following http://wiki.ros.org/Installation/Source building using PIP method
Update PIP and install dependencies
sudo pip install --upgrade setuptools
sudo pip install -U rosdep rosinstall_generator wstool rosinstall
Initialize rosdep
$ sudo rosdep init
$ rosdep update
Create catkin workspace with bare-bones ROS
$ mkdir ~/ros_catkin_ws
$ cd ~/ros_catkin_ws
$ rosinstall_generator ros_comm --rosdistro melodic --deps --tar > melodic-ros_comm.rosinstall
$ wstool init -j8 src melodic-ros_comm.rosinstall
Resolve dependencies and build catkin workspace
rosdep install --from-paths src --ignore-src --rosdistro melodic -y
./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
Source it (and add to ~/.bashrc)
source ~/ros_catkin_ws/install_isolated/setup.bash
Building packages
TODO:
– Put proper commands
– Don’t build from the ROS ws, create a new catkin workspace
cd ~/ros_catkin_ws/src
git clone package_name
cd ..
rosdep install --from-paths src --ignore-src -r -y
catkin_make_isolated --source src --install
Creating a new work-space for packages
Create a new work-space for building packages
mkdir -p ~/ros_packages/src
cd ~/ros_packages
catkin_make
source devel_isolated/setup.bash
Add the packages to the src directory, then get dependencies with rosdep and build with catkin
rosdep install --from-paths src --ignore-src -r -y
catkin_make_isolated --source src --install
ROS Packages
ROS image_view
Docs at http://wiki.ros.org/image_view
Subscribes to a sensor_msgs/Image topic and displays the video stream. Launch with:
rosrun image_view image_view image:=/camera/image
where /camera/image is the topic to subscribe to.
Packages to build from source:
git clone https://github.com/ros-perception/image_pipeline
git clone https://github.com/ros/geometry
git clone https://github.com/ros/geometry2
git clone https://github.com/ros/actionlib
git clone https://github.com/ros/angles
git clone https://github.com/orocos/orocos_kinematics_dynamics
ROS rqt_image_view
Docs at http://wiki.ros.org/rqt_image_view
Subscribes to a sensor_msgs/Image topic and displays the video stream with a GUI.
Launch with:
rosrun rqt_image_view rqt_image_view
Packages to build from source:
git clone https://github.com/ros-visualization/rqt_image_view
git clone https://github.com/ros-visualization/rqt
git clone https://github.com/ros-visualization/python_qt_binding
git clone https://github.com/ros-visualization/rqt_common_plugins
git clone https://github.com/ros-visualization/rqt_py_console
git clone https://github.com/ros-visualization/rqt_graph
git clone https://github.com/ros-visualization/rqt_console
git clone https://github.com/ros-visualization/qt_gui_core
git clone https://github.com/ros-visualization/rqt_srv
git clone https://github.com/ros-visualization/rqt_reconfigure
git clone https://github.com/ros-visualization/rqt_bag
git clone https://github.com/ros-visualization/rqt_plot
git clone https://github.com/ros-visualization/rqt_publisher
git clone https://github.com/ros-visualization/rqt_web
git clone https://github.com/ros-visualization/rqt_shell
git clone https://github.com/ros-visualization/rqt_launch
git clone https://github.com/ros-visualization/rqt_topic
git clone https://github.com/ros-visualization/rqt_action
git clone https://github.com/ros-visualization/rqt_top
git clone https://github.com/ros-visualization/rqt_logger_level
git clone https://github.com/ros-visualization/rqt_msg
git clone https://github.com/ros-visualization/rqt_service_caller
git clone https://github.com/ros-visualization/rqt_dep
git clone https://github.com/ros-visualization/qwt_dependency
git clone https://github.com/ros-visualization/webkit_dependency
git clone https://github.com/ros/roslint
GSCAM & GStreamer
Docs at http://wiki.ros.org/gscam
Publishes a sensor_msgs/Image topic leveraging GStreamer
Packages to build from source:
git clone https://github.com/ros-drivers/gscam
git clone https://github.com/ros/nodelet_core
git clone https://github.com/ros-perception/image_common
git clone https://github.com/ros/common_msgs
git clone https://github.com/ros-perception/vision_opencv
git clone https://github.com/ros/dynamic_reconfigure
git clone https://github.com/ros/bond-core
git clone https://github.com/ros/rosbag_migration_rule
# Configure camera_calibrator - not required, can use default
Test GStreamer with test video source
gst-launch-1.0 videotestsrc ! video/x-raw,width=1280,height=720 ! ximagesink
or with video source from onboard camera
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=1280, height=720, framerate=30/1, format=NV12' ! nvvidconv flip-method=2 ! ximagesink
gscam_nodelet.launch
Launch file for gscam located at ~/ros_catkin_ws/install_isolated/share/gscam
<launch>
<arg name="DEVICE" default="/dev/video0"/>
<!-- The GStreamer framerate needs to be an integral fraction -->
<arg name="FPS" default="30/1"/>
<node pkg="nodelet" type="nodelet"
name="standalone_nodelet" args="manager"
output="screen"/>
<node pkg="nodelet" type="nodelet"
name="GSCamNodelet"
args="load gscam/GSCamNodelet standalone_nodelet"
output="screen">
<param name="camera_name" value="default"/>
<param name="camera_info_url" value="package://gscam/examples/uncalibrated_parameters.ini"/>
<!-- <param name="gscam_config" value="videotestsrc ! video/x-raw,width=1280,height=720 ! videoconvert"/>-->
<param name="gscam_config" value="nvarguscamerasrc ! video/x-raw(memory:NVMM),width=1280, height=720, framerate=30/1, format=NV12 ! nvvidconv flip-method=2 ! videoconvert"/>
<param name="frame_id" value="/v4l_frame"/>
<param name="sync_sink" value="true"/>
</node>
</launch>
Launch with
roslaunch gscam_nodelet.launch
Note: Difference between command line and launch file – remove the single quotes from around the caps filter in the launch file param