Skip to content

Commit

Permalink
Merge pull request #22 from NVIDIA-ISAAC-ROS/release-dp3.1
Browse files Browse the repository at this point in the history
Isaac ROS 0.31.0 (DP3.1)
  • Loading branch information
hemalshahNV authored May 26, 2023
2 parents 51c942c + 71e65e7 commit bbbd0b3
Show file tree
Hide file tree
Showing 172 changed files with 29,018 additions and 747 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The NVIDIA implementation of type adaption and negotiation are called NITROS (NV

## Latest Update

Update 2023-04-05: Update to be compatible with JetPack 5.1.1
Update 2023-05-25: CPU usage optimizations.

## Supported Platforms

Expand Down Expand Up @@ -201,6 +201,7 @@ Please visit the link below for an example graph that consists of NITROS-acceler

| Date | Changes |
| ---------- | ------------------------------------------ |
| 2023-05-25 | CPU usage optimizations |
| 2023-04-05 | Update to be compatible with JetPack 5.1.1 |
| 2022-10-19 | Minor updates and bugfixes |
| 2022-08-31 | Update to be compatible with JetPack 5.0.2 |
Expand Down
1 change: 1 addition & 0 deletions isaac_ros_gxf/cmake/modules/FindGXF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ list(APPEND _GXF_EXTENSIONS
cuda
isaac_messages
isaac_ros_messages
message_compositor
multimedia
gxf_optimizer
serialization
Expand Down
2 changes: 2 additions & 0 deletions isaac_ros_gxf/gxf/core/include/common/endian.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
namespace nvidia {

/// Returns true if the machine stores multi-byte integers in little-endian format
/// FIXME: Use std::memcpy if reinterpret_cast has to be removed
inline bool IsLittleEndian() {
const uint16_t test = 0x0102;
return *reinterpret_cast<const uint8_t*>(&test) == 0x02;
Expand Down Expand Up @@ -62,6 +63,7 @@ template <> inline uint16_t DecodeLittleEndian<uint16_t>(uint16_t value) { retur
template <> inline uint8_t DecodeLittleEndian<uint8_t> (uint8_t value) { return value; }

/// Returns true if the machine stores multi-byte integers in big-endian format
/// FIXME: Use std::memcpy if reinterpret_cast has to be removed
inline bool IsBigEndian() {
const uint16_t test = 0x0102;
return *reinterpret_cast<const uint8_t*>(&test) == 0x01;
Expand Down
1 change: 1 addition & 0 deletions isaac_ros_gxf/gxf/core/include/gxf/core/component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class Component {

// The entity which owns this component
Entity entity() const noexcept {
// FIXME(v1) check that value exists
return Entity::Shared(context(), eid()).value();
}

Expand Down
6 changes: 5 additions & 1 deletion isaac_ros_gxf/gxf/core/include/gxf/core/entity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ namespace gxf {

// All GXF objects are entities. An entity owns multiple components which define the functionality
// of the entity. Entities themselves are nothing more than a unique identifier.
// FIXME This type is a bit strange as it looks like and entity, but is in face just a handle.
class Entity {
public:
// Creates a new entity
Expand Down Expand Up @@ -74,6 +75,7 @@ class Entity {
eid_ = other.eid();
context_ = other.context();
if (eid_ != kNullUid) {
// FIXME(dweikersdorf) How do we deal with failure?
GxfEntityRefCountInc(context_, eid_);
}
}
Expand All @@ -96,6 +98,7 @@ class Entity {
context_ = other.context();
eid_ = other.eid();
if (eid_ != kNullUid) {
// FIXME(dweikersdorf) How do we deal with failure?
GxfEntityRefCountInc(context_, eid_);
}
return *this;
Expand Down Expand Up @@ -293,7 +296,8 @@ class Entity {

private:
void release() {
GxfEntityRefCountDec(context_, eid_);
GxfEntityRefCountDec(context_, eid_); // TODO(v2) We should use the error code, but we can't
// do anything about it..
eid_ = kNullUid;
}

Expand Down
5 changes: 4 additions & 1 deletion isaac_ros_gxf/gxf/core/include/gxf/core/parameter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,15 @@ class ParameterBackendBase {
// Returns true if it is possible to change this parameter
bool isImmutable() const {
if (isConstant()) {
const bool is_active = false;
const bool is_active = false; // FIXME(v1) Check that component is not active.
if (is_active) {
return true;
}
}
return false;
}

// FIXME(v1) make private
gxf_context_t context_;
gxf_uid_t uid_;
gxf_parameter_flags_t flags_;
Expand Down Expand Up @@ -118,6 +119,7 @@ class ParameterBackend : public ParameterBackendBase {
// Gets the current value of the parameter.
const Expected<T>& try_get() const { return value_; }

// FIXME(v1) make private
nvidia::gxf::Parameter<T>* frontend_ = nullptr;
std::function<bool(const T&)> validator_;
Expected<T> value_ = Unexpected{GXF_PARAMETER_NOT_INITIALIZED};
Expand Down Expand Up @@ -192,6 +194,7 @@ class ParameterBackend<Handle<T>> : public HandleParameterBackend {
return value_;
}

// FIXME(v1) make private
const Expected<Handle<T>> unspecified_handle_ = Unexpected{GXF_PARAMETER_NOT_INITIALIZED};
nvidia::gxf::Parameter<Handle<T>>* frontend_ = nullptr;
Expected<Handle<T>> value_ = Unexpected{GXF_PARAMETER_NOT_INITIALIZED};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class DefaultExtension : public Extension {
std::string description_;
std::string author_;
std::string extension_version_;
std::string gxf_core_version_{kGxfCoreVersion};
std::string gxf_core_version_{kGxfCoreVersion}; // FIXME: Use setInfo() api to set this post 2.3
std::string license_;
std::string display_name_;
std::string category_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,9 @@ bool StagingQueue<T>::push(T item) {
break;
case OverflowBehavior::kFault:
return false;
// FIXME "Added an item to a full queue while using the 'Fault' overflow behavior."
default:
// FIXME "Invalid parameter"
return false;
}
} else {
Expand Down Expand Up @@ -342,7 +344,9 @@ bool StagingQueue<T>::sync() {
break;
case OverflowBehavior::kFault:
return false;
// FIXME "Added items to a full queue while using the 'Fault' overflow behavior.";
default:
// FIXME "Invalid parameter"
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ struct ParameterParser<FixedString<N>> {

// Specialization of ParameterParser for FixedVector with stack allocation.
// Substitutes std::array for safety-critical components.
// TODO(ayusmans): parsing support for FixedVector with heap allocation
template <typename T, size_t N>
struct ParameterParser<FixedVector<T, N>> {
static Expected<FixedVector<T, N>> Parse(gxf_context_t context, gxf_uid_t component_uid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ class ParameterRegistrar {
template <typename... Args>
storage_impl(Args&&... args) : value(std::forward<Args>(args)...) {}

// FIXME: return c_str() directly for string types to avoid reinterpret_cast
const void* get() const override { return &value; }

std::unique_ptr<storage_base> clone() const override {
Expand Down
4 changes: 3 additions & 1 deletion isaac_ros_gxf/gxf/core/include/gxf/std/parameter_storage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <map>
#include <memory>
#include <mutex>
#include <shared_mutex> // NOLINT
#include <string>
#include <utility>
Expand Down Expand Up @@ -67,6 +68,7 @@ class ParameterStorage {
backend->headline_ = headline;
backend->description_ = description;
backend->frontend_ = frontend;
// FIXME(v1) validator

frontend->connect(backend.get());

Expand Down Expand Up @@ -117,7 +119,7 @@ class ParameterStorage {
const auto code = ptr->set(std::move(value));
if (!code) { return ForwardError(code); }

ptr->writeToFrontend();
ptr->writeToFrontend(); // FIXME(v1) Special treatment for codelet parameters
return Success;
}

Expand Down
2 changes: 1 addition & 1 deletion isaac_ros_gxf/gxf/core/include/gxf/std/tensor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class Tensor {
Tensor() = default;

~Tensor() {
memory_buffer_.freeBuffer();
memory_buffer_.freeBuffer(); // FIXME(V2) error code?
element_count_ = 0;
shape_ = Shape();
}
Expand Down
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
2 changes: 1 addition & 1 deletion isaac_ros_gxf/gxf/core/lib/gxf_jetpack51/npp/libgxf_npp.so
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
2 changes: 1 addition & 1 deletion isaac_ros_gxf/gxf/core/lib/gxf_jetpack51/std/libgxf_std.so
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Loading

0 comments on commit bbbd0b3

Please sign in to comment.