dusty-nv / ros_deep_learning

Deep learning inference nodes for ROS / ROS2 with support for NVIDIA Jetson and TensorRT
887 stars 258 forks source link

catkin error: 'Dims3' in namespace 'nvinfer1' does not name a type #51

Closed ajal-fh closed 3 years ago

ajal-fh commented 3 years ago

Thank you for providing the amazing tutorial for getting in speed with the jetson nano and pytorch. I'm running jetson inference on a docker container. I was succesfully able to complete pytorch-ssd tutorial Following is my Dockerfile which is based on the dustynv/jetson-inference:r32.4.4 image:

FROM dustynv/jetson-inference:r32.4.4

ENV DEBIAN_FRONTEND=noninteractive
ENV SHELL /bin/bash

RUN apt update && apt install -y \
    lsb-release \
    gnupg2
RUN apt-get clean all

RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

RUN apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

RUN apt update

RUN apt install -y ros-melodic-ros-base

RUN apt install -y ros-melodic-image-transport \
    ros-melodic-vision-msgs

RUN pip install defusedxml \
    rospkg \
    netifaces
WORKDIR /catkin_ws
CMD /bin/bash -c "bash"

When I try to run catkin_make on my workspace, I get mainly the following errors:

error: 'Dims3' in namespace 'nvinfer1' does not name a type
 typedef nvinfer1::Dims3 Dims3;

/usr/local/include/jetson-inference/tensorNet.h:320:17: error: 'nvinfer1::IPluginFactory' has not been declared

/usr/local/include/jetson-inference/tensorNet.h:331:29: error: 'nvinfer1::ICudaEngine' has not been declared

/usr/local/include/jetson-inference/tensorNet.h:568:35: error: 'nvinfer1::IBuilder' has not been declared

/usr/local/include/jetson-inference/tensorNet.h:581:20: error: 'Severity' has not been declared
/catkin_ws/src/ros_deep_learning/src/node_detectnet.cpp:231:23: error: 'SSD_MOBILENET_V2' is not a member of 'detectNet'
    model = detectNet::SSD_MOBILENET_V2;

I saw a similar issue: but was not clear what changes should I make Any help would greatly be appreciated. Thank you.

ajal-fh commented 3 years ago

Installing jetson-inference and ROS melodic directly on a latest Imgae (ubuntu 18.04 LTS ) and building the package from master branch solved the issue. Initially I was trying to run on ubuntu 16.04 Image.