Hi @dusty_nv,
I am afraid I am a little confused, doesn’t the example refer to just publishing a single image rather than a camera stream? Or should that be somehow modified?
To answer your question, yes the kinect2_bridge node puts out the /kinect2/hd/image_color topic, which is message of encoding type BGR8:
$ rostopic echo /kinect2/hd/image_color/encoding
"bgr8"
---
"bgr8"
.....
At the moment I have tried using
roslaunch ros-deep-learning imagenet.launch
and get the error message:
[ERROR] [1547071038.693147336]: Failed to load nodelet [/gst_camera] of type [ros_jetson_video/gst_camera]
even after refreshing the cache: According to the loaded plugin descriptions the class
ros_jetson_video/gst_camera with base class type nodelet::Nodelet does not exist. Declared types
are depth_image_proc/convert_metric depth_image_proc/crop_foremost depth_image_proc/disparity
depth_image_proc/point_cloud_xyz depth_image_proc/point_cloud_xyz_radial
depth_image_proc/point_cloud_xyzi depth_image_proc/point_cloud_xyzi_radial
depth_image_proc/point_cloud_xyzrgb depth_image_proc/register image_proc/crop_decimate
image_proc/crop_nonZero image_proc/crop_non_zero image_proc/debayer image_proc/rectify
image_proc/resize image_publisher/image_publisher image_rotate/image_rotate image_view/disparity
image_view/image kinect2_bridge/kinect2_bridge_nodelet
kobuki_safety_controller/SafetyControllerNodelet nodelet_tutorial_math/Plus pcl/BAGReader
pcl/BoundaryEstimation pcl/ConvexHull2D pcl/CropBox pcl/EuclideanClusterExtraction
pcl/ExtractIndices pcl/ExtractPolygonalPrismData pcl/FPFHEstimation pcl/FPFHEstimationOMP
pcl/MomentInvariantsEstimation pcl/MovingLeastSquares pcl/NodeletDEMUX pcl/NodeletMUX
pcl/NormalEstimation pcl/NormalEstimationOMP pcl/NormalEstimationTBB pcl/PCDReader pcl/PCDWriter
pcl/PFHEstimation pcl/PassThrough pcl/PointCloudConcatenateDataSynchronizer
pcl/PointCloudConcatenateFieldsSynchronizer pcl/PrincipalCurvaturesEstimation pcl/ProjectInliers
pcl/RadiusOutlierRemoval pcl/SACSegmentation pcl/SACSegmentationFromNormals pcl/SHOTEstimation
pcl/SHOTEstimationOMP pcl/SegmentDifferences pcl/StatisticalOutlierRemoval pcl/VFHEstimation
pcl/VoxelGrid ros_deep_learning/ros_imagenet rtabmap_ros/data_odom_sync rtabmap_ros/data_throttle
rtabmap_ros/disparity_to_depth rtabmap_ros/icp_odometry rtabmap_ros/obstacles_detection
rtabmap_ros/obstacles_detection_old rtabmap_ros/point_cloud_aggregator rtabmap_ros/point_cloud_xyz
rtabmap_ros/point_cloud_xyzrgb rtabmap_ros/pointcloud_to_depthimage rtabmap_ros/rgbd_odometry
rtabmap_ros/rgbd_sync rtabmap_ros/rgbdicp_odometry rtabmap_ros/rtabmap rtabmap_ros/stereo_odometry
rtabmap_ros/stereo_sync rtabmap_ros/stereo_throttle rtabmap_ros/undistort_depth
stereo_image_proc/disparity stereo_image_proc/point_cloud2
yocs_velocity_smoother/VelocitySmootherNodelet
[ERROR] [1547071038.693274439]: The error before refreshing the cache was:
According to the loaded plugin descriptions the class ros_jetson_video/gst_camera with base class
type nodelet::Nodelet does not exist. Declared types are depth_image_proc/convert_metric
depth_image_proc/crop_foremost depth_image_proc/disparity depth_image_proc/point_cloud_xyz
depth_image_proc/point_cloud_xyz_radial depth_image_proc/point_cloud_xyzi
depth_image_proc/point_cloud_xyzi_radial depth_image_proc/point_cloud_xyzrgb
depth_image_proc/register image_proc/crop_decimate image_proc/crop_nonZero image_proc/crop_non_zero
image_proc/debayer image_proc/rectify image_proc/resize image_publisher/image_publisher
image_rotate/image_rotate image_view/disparity image_view/image
kinect2_bridge/kinect2_bridge_nodelet kobuki_safety_controller/SafetyControllerNodelet
nodelet_tutorial_math/Plus pcl/BAGReader pcl/BoundaryEstimation pcl/ConvexHull2D pcl/CropBox
pcl/EuclideanClusterExtraction pcl/ExtractIndices pcl/ExtractPolygonalPrismData pcl/FPFHEstimation
pcl/FPFHEstimationOMP pcl/MomentInvariantsEstimation pcl/MovingLeastSquares pcl/NodeletDEMUX
pcl/NodeletMUX pcl/NormalEstimation pcl/NormalEstimationOMP pcl/NormalEstimationTBB pcl/PCDReader
pcl/PCDWriter pcl/PFHEstimation pcl/PassThrough pcl/PointCloudConcatenateDataSynchronizer
pcl/PointCloudConcatenateFieldsSynchronizer pcl/PrincipalCurvaturesEstimation pcl/ProjectInliers
pcl/RadiusOutlierRemoval pcl/SACSegmentation pcl/SACSegmentationFromNormals pcl/SHOTEstimation
pcl/SHOTEstimationOMP pcl/SegmentDifferences pcl/StatisticalOutlierRemoval pcl/VFHEstimation
pcl/VoxelGrid ros_deep_learning/ros_imagenet rtabmap_ros/data_odom_sync rtabmap_ros/data_throttle
rtabmap_ros/disparity_to_depth rtabmap_ros/icp_odometry rtabmap_ros/obstacles_detection
rtabmap_ros/obstacles_detection_old rtabmap_ros/point_cloud_aggregator rtabmap_ros/point_cloud_xyz
rtabmap_ros/point_cloud_xyzrgb rtabmap_ros/pointcloud_to_depthimage rtabmap_ros/rgbd_odometry
rtabmap_ros/rgbd_sync rtabmap_ros/rgbdicp_odometry rtabmap_ros/rtabmap rtabmap_ros/stereo_odometry
rtabmap_ros/stereo_sync rtabmap_ros/stereo_throttle rtabmap_ros/undistort_depth
stereo_image_proc/disparity stereo_image_proc/point_cloud2
yocs_velocity_smoother/VelocitySmootherNodelet
[FATAL] [1547071038.693538822]: Failed to load nodelet '/gst_camera` of type
`ros_jetson_video/gst_camera` to manager `standalone_nodelet'
[gst_camera-3] process has died [pid 6596, exit code 255, cmd /opt/ros/kinetic/lib/nodelet/nodelet
load ros_jetson_video/gst_camera standalone_nodelet ~image_raw:=/image_raw __name:=gst_camera
__log:=/home/nvidia/.ros/log/e2bc8628-1458-11e9-85e8-00044b8d1fa5/gst_camera-3.log].
log file: /home/nvidia/.ros/log/e2bc8628-1458-11e9-85e8-00044b8d1fa5/gst_camera-3*.log
The named log shows:
e[0m[ INFO] [1547071035.381774585]: Loading nodelet /gst_camera of type ros_jetson_video/gst_camera to manager standalone_nodelet with the following remappings:e[0m
e[0m[ INFO] [1547071035.381907033]: /gst_camera/image_raw -> /image_rawe[0m
e[0m[ INFO] [1547071035.389916992]: waitForService: Service [/standalone_nodelet/load_nodelet] has not been advertised, waiting...e[0m
e[0m[ INFO] [1547071035.436526706]: waitForService: Service [/standalone_nodelet/load_nodelet] is now available.e[0m
I have also tried using a separate program, ros-virtual-cam, which creates a v4l2 camera object via v4l2loopback. As part of another effort to get inference working, I edited gstcamera.cpp to look for the index of the camera object (dev/video1) as follows:
gstCamera::gstCamera()
{
mAppSink = NULL;
mBus = NULL;
mPipeline = NULL;
mV4L2Device = 1;
...
As I (probably wrongly) guessed that gstcamera.cpp was what the launch file was referring to. I was hoping that the
<!-- gst_camera nodelet -->
<node name="gst_camera"
pkg="nodelet" type="nodelet"
args="load ros_jetson_video/gst_camera standalone_nodelet">
<remap from="~image_raw" to="/image_raw"/>
</node>
section in the launch file would then just see my new v4l2 camera object and use that, but no dice.
I am not sure if its relevant, but I needed to change the paths.yaml to get rid of file not found errors. I changed it to:
imagenet_node:
prototxt_path: "/home/nvidia/jetson-inference/data/networks/googlenet.prototxt"
model_path: "/home/nvidia/jetson-inference/data/networks/bvlc_googlenet.caffemodel"
class_labels_path: "/home/nvidia/jetson-inference/data/networks/ilsvrc12_synset_words.txt"
Am I missing something simple? I must apologise as I am an educational TX2 user and still very much learning, so I am also bumping up against the limits of my coding ability as I learn :(
Thanks for reading!
RR