This is a reference page for the NVRC client API used with the Isaac RC client sample app.
The nvrcPipeline class wraps the low-level nvrc pipeline and channels.
Overview
Function | Description |
nvrcPipeline() | The constructor that creates the nvrc pipeline and connects to the control server |
getFrame() | Gets the latest new frame. |
operator `bool()`_ | |
queryConfig() | Queries the server for its capabilities. |
sendJsEvent() | Sends a joystick event to the server. |
start() | Signals the server to start streaming. |
`stop()`_ | Signals the server to stop streaming. |
Public Member Functions
nvrcPipeline()
nvidia::jrt::api::nvrcPipeline::nvrcPipeline ( std::string host,
uint16_t port = 48010,
std::string workspacePath = "",
std::string graphPath = ""
)
The constructor that creates the nvrc pipeline and connects to the control server.
Parameters
host
: The IP address of the nvrc serverport
: The port of the nvrc server (video channel). Setting this parameter to anything other than the default is currently not supported.
nvidia::jrt::api::nvrcPipeline::nvrcPipeline ( )
The default constructor.
nvidia::jrt::api::nvrcPipeline::~nvrcPipeline ( )
The destructor.
getFrame()
nvrcStatus nvidia::jrt::api::nvrcPipeline::getFrame ( nxw::nvrcFrame & frame,
bool wait = false
)
Gets the latest new frame.
Parameters
- [out]
frame
: The frame to fill - [in]
wait
: Specifies whether to block or not.
Returns
nvrcStatus status
operator bool()
nvidia::jrt::api::nvrcPipeline::operator bool ( ) const
queryConfig()
nvidia::jrt::api::nvrcPipeline::queryConfig ( nxw::nvrcConfig & config )
Queries the server for its capabilities.
Parameters
- [out]
config
: The default server config
Returns
nvrcStatus status
sendJsEvent()
void nvidia::jrt::api::nvrcPipeline::sendJsEvent ( const nxw::nvrcJsEvent & event )
Sends a joystick event to the server.
Parameters
- [in]
event
: The event to send
start()
nvrcStatus nvidia::jrt::api::nvrcPipeline::start ( const nxw::nvrcConfig & config )
Signals the server to start streaming.
Parameters
- [in] :code`config`: The selected config for the server/client to use
Returns
nvrcStatus status
stop()
nvrcStatus nvidia::jrt::api::nvrcPipeline::stop ( )
Signals the server to stop streaming.
Returns
nvrcStatus status
Overview
Classes
Class | Description |
class FIFO | A first-in first-out thread-safe queue, with type T elements, using type LOCK for synchronization. |
struct nvrc2DPoints | A collection of 2D points represented in memory as [x1, y1, x2, y2, …, xcount, ycount]. |
struct nvrcConfig | Defines the expectations the client should have about the data coming from the server, or the demands the client makes of the data the server sends. |
struct nvrcFrame | All the video and data from a single timestamp. |
struct nvrcJsEvent | A joystick event, with the state of axes and buttons on the controller. |
struct nvrcProjection | Defines the projection and crop for an image. |
struct nvrcServerControlMsg | A message containing a config for the recipient to either accept or modify somehow and return. This message by itself is sent by the server to inform the client of the server capabilities. |
struct nvrcServerControlResp | A control message sent by the client to inform the server of its needs. |
class SharedDataBuffer | A wrapper around an nvrcData buffer with an id for internal use. On destruction, internal FIFOs that hold this will automatically free up the slot used. |
class SharedImageBuffer | A wrapper around an nvrcVideoFrameGroup and its projections. On destruction, the FIFO given in the constructor will free up the slot used by this buffer. |
Typedefs
Typedef | Description |
nvrcDataType | The type of data held in the data buffer. For now, only generic data is supported. |
nvrcFrame | All the video and data from a single timestamp. |
nvrcConfig | Defines the expectations the client should have about the data coming from the server, or the demands the client makes of the data the server sends. |
nvrcServerControlMsgType | Whether the control message is telling the recipient to start, stop, or reconfigure. |
nvrcServerControlMsg | A message containing a config for the recipient to either accept or modify somehow and return. This message by itself is sent by the server to inform the client of the server capabilities. |
nvrcServerControlResp | A control message sent by the client to inform the server of its needs. |
nvrc2DPoints | A collection of 2D points represented in memory as [x1, y1, x2, y2, …, xcount, ycount]. |
nvrcProjection | Defines the projection and crop for an image. |
SharedImageFIFO |
Enumerations
Enum | Description |
nvrcDataType | The type of data held in the data buffer. For now, only generic data is supported. |
nvrcServerControlMsgType | Whether the control message is telling the recipient to start, stop, or reconfigure. |
Classes
FIFO
A first-in first-out thread-safe queue with type T elements, using type LOCK for synchronization.
Type T must support default initialization, and type LOCK must support the same function calls that
std::mutex
does.
#include <FIFO.hpp>
Public Member Functions
pop()
template<typename T , typename LOCK = std::mutex>
T nvidia::jrt::nvrc::FIFO< T, LOCK >::pop ( bool block = true )
Removes and returns the element at the front of the queue.
Parameters
block
: By default,pop()
blocks while the queue is empty. Ifblock
is set tofalse
and the queue is empty,pop()
will instead return a default-initialized object of type T.
push()
template<typename T , typename LOCK = std::mutex>
void nvidia::jrt::nvrc::FIFO< T, LOCK >::push ( T && item )
Inserts an element at the back of the queue using move semantics.
Parameters
item
: The item to insert
size()
template<typename T , typename LOCK = std::mutex>
size_t nvidia::jrt::nvrc::FIFO< T, LOCK >::size ( )
Returns the number of elements in the queue.
stop()
template<typename T , typename LOCK = std::mutex>
void nvidia::jrt::nvrc::FIFO< T, LOCK >::stop ( )
Frees all threads blocked in a pop call.
nvrc2DPoints
A collection of 2D points represented in memory as [x1, y1, x2, y2, …, xcount, ycount].
#include <nvrcProjection.hpp>
Public Attributes
uint32_t streamIdx
float * ptr
uint32_t count
nvrcConfig
Defines the expectations that the client should have about the data coming from the server or the demands the client makes of the data the server sends.
#include <nvrcConfig.hpp>
platformConfig
std::string nvidia::jrt::nvrc::nvrcConfig::platformConfig
A config protocol that is defined and conformed to by a platform-specific server/client pair.
streamingParams
nvrcStreamingParams nvidia::jrt::nvrc::nvrcConfig::streamingParams
nvrcFrame
All the video and data from a single timestamp.
#include <nvrcBuffer.hpp>
dataType
nvrcDataType nvidia::jrt::nvrc::nvrcFrame::dataType
genericData
std::shared_ptr<SharedDataBuffer> nvidia::jrt::nvrc::nvrcFrame::genericData
imageGroup
std::shared_ptr<SharedImageBuffer> nvidia::jrt::nvrc::nvrcFrame::imageGroup
nvrcJsEvent
A joystick event, with the state of axes and buttons on the controller.
#include <nvrcBuffer.hpp>
axes
std::array<float, 4> nvidia::jrt::nvrc::nvrcJsEvent::axes
buttons
std::array<bool, 12> nvidia::jrt::nvrc::nvrcJsEvent::buttons
nvrcProjection
Defines the projection and crop for an image.
#include <nvrcProjection.hpp>
bottom
float nvidia::jrt::nvrc::nvrcProjection::bottom
left
float nvidia::jrt::nvrc::nvrcProjection::left
FOV angles in radians from the center of the camera.
position
float nvidia::jrt::nvrc::nvrcProjection::position[3]
A camera position relative to the vehicle origin.
right
float nvidia::jrt::nvrc::nvrcProjection::right
rotation
float nvidia::jrt::nvrc::nvrcProjection::rotation[4]
The camera-to-world rotation as a quaternion (w, x, y, z).
top
float nvidia::jrt::nvrc::nvrcProjection::top
nvrcServerControlMsg
A message containing a config for the recipient to either accept or modify somehow and return. This message by itself is sent by the server to inform the client of the server capabilities.
#include <nvrcConfig.hpp>

config
nvrcConfig nvidia::jrt::nvrc::nvrcServerControlMsg::config
type
nvrcServerControlMsgType nvidia::jrt::nvrc::nvrcServerControlMsg::type
nvrcServerControlResp
A control message sent by the client to inform the server of its needs.
#include <nvrcConfig.hpp>

msg
nvrcServerControlMsg nvidia::jrt::nvrc::nvrcServerControlResp::msg
status
nvrcStatus nvidia::jrt::nvrc::nvrcServerControlResp::status
SharedDataBuffer
A wrapper around an nvrcData buffer with an ID for internal use. On destruction, internal FIFOs that hold this wrapper will automatically free up the occupied slot.
#include <nvrcBuffer.hpp>
Public Member Functions
SharedDataBuffer()
nvidia::jrt::nvrc::SharedDataBuffer::SharedDataBuffer ( nvrcData & data,
uint32_t id
)
nvidia::jrt::nvrc::SharedDataBuffer::~SharedDataBuffer ( )
Public Attributes
m_data
nvrcData nvidia::jrt::nvrc::SharedDataBuffer::m_data
m_id
uint32_t nvidia::jrt::nvrc::SharedDataBuffer::m_id
SharedImageBuffer
A wrapper around an nvrcVideoFrameGroup and its projections. On destruction, the FIFO given in the constructor will free up the slot used by this buffer.
#include <nvrcBuffer.hpp>

Public Member Functions
SharedImageBuffer()
nvidia::jrt::nvrc::SharedImageBuffer::SharedImageBuffer ( nvrcVideoFrameGroup && group,
std::weak_ptr< SharedImageFIFO > fifo
)
nvidia::jrt::nvrc::SharedImageBuffer::~SharedImageBuffer ( )
Public Attributes
m_group
nvrcVideoFrameGroup nvidia::jrt::nvrc::SharedImageBuffer::m_group
m_projections
nvrcProjection nvidia::jrt::nvrc::SharedImageBuffer::m_projections[NVRC_MAX_VIDEO_FRAME_GROUP_COUNT]
Projections correspond to the video frames in m_group
, in the same order.
m_sharedImageFIFO
std::weak_ptr<SharedImageFIFO> nvidia::jrt::nvrc::SharedImageBuffer::m_sharedImageFIFO
Enumerations
enum nvidia::jrt::nvrc::nvrcDataType
The type of data held in the data buffer. For now, only generic data is supported.
Enumerator
NVRC_DATA_TYPE_GENERIC_DATA
enum nvidia::jrt::nvrc::nvrcServerControlMsgType
Indicates whether the control message is instructing the recipient to start, stop, or reconfigure.
Enumerator
NVRC_SERVER_CONTROL_START
NVRC_SERVER_CONTROL_STOP
NVRC_SERVER_CONTROL_RECONFIGURE