Skip to content

Add several interfaces about point cloud etc#127

Open
yzhou-bcom wants to merge 6 commits intomasterfrom
feat/add-pc-semantic-generator
Open

Add several interfaces about point cloud etc#127
yzhou-bcom wants to merge 6 commits intomasterfrom
feat/add-pc-semantic-generator

Conversation

@yzhou-bcom
Copy link
Contributor

No description provided.

@yzhou-bcom yzhou-bcom requested a review from jim-bcom February 23, 2026 10:33
*/
enum class KeyframeFileType {
TDF, /**< TDF format */
UNDEFINED = 1000,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason not to define UNDEFINED first, and removing the =1000 ?

If UNDEFINED is declared first, new values could be added without changing its numerical representation.

* @enum keyframe file type
*/
enum class KeyframeFileType {
TDF, /**< TDF format */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you give it a less brand-releated and more descriptive name?

/// @brief Return the text definition (string) of a KeyframeFileType object
/// @param[in] keyframeFileType the keyframe file type
/// @return the text definition (string)
static std::string toString(const KeyframeFileType& keyframeFileType)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I guess enums can be passed by value

/// @brief Return the text definition (string) of a KeyframeFileType object
/// @param[in] keyframeFileType the keyframe file type
/// @return the text definition (string)
static std::string toString(const KeyframeFileType& keyframeFileType)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you already use std::optional for parseKeyframeFileType() , why not using it here as well, instead of returning "Unknown value", so that caller can easily check if there was a problem, instead of checking this code to see against which string value it has to compare the result?

/**
* @enum keyframe file type
*/
enum class KeyframeFileType {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KeyframeFileType does not appear in IKeyframeLoader API (or anywhere else).

Does it make sense to define it here?

Unless it needs to be referenced elsewhere, like datastructure::DescriptorType in Map.h.

We could have an implementation module component that defines this, or have a component implementing this interface by type, for example.

// we use m_keyframesManager to access the keyframes and optimize their poses
// the modifs on keyframes' poses will not be applied to the keyframe collection of m_map
m_keyframeCollection = keyframeCollection;
if (!m_keyframeCollection) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I don't remember exactly how it is supposed to work, because it's a bit complicated so I'm just wondering:

  • does m_embedKeyframeImages == true mean that we have images for ALL Keyframes? Or is it possible that some KF don't have images associated with them (because of Map fusion for example,...).
  • If so, does the fact that the KF collection we're passing here does not have any image actually mean that this map should have its flag m_embedKeyframeImages == false? Or could it be a particular case?

My question is: is this flag related to the fact that this KF collection has images, is it actually more a decision on whether or not we should serialize images, whether it has them or not?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this flag is only used to indicate if KF collection has images, not related to serialization. m_embedKeyframeImages == true means that at least one of the keyframes in the map have image data

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • This seems to literally contradict the comment you placed just above, no?
// m_embedKeyframeImages is only used in serialization to decide if we serialize images
  • Also, there's this method which tends to indicate what I was referring to, that is, it's a flag activated by the user of the map to decide whether it is supposed to have images or not, not by a detection of the presence of a Keyframe image.
void Map::embedKeyframeImages()
{
    m_embedKeyframeImages = true;
}
  • I didn't see a reference where the existence of an image would toggle this flag to true (in Map.cpp, at least).

This being said, I'll let you the final word on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants