Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'HelloWorld' object has no attribute 'xxx' #75

Open
xuanyuxin opened this issue Dec 7, 2023 · 0 comments
Open

AttributeError: 'HelloWorld' object has no attribute 'xxx' #75

xuanyuxin opened this issue Dec 7, 2023 · 0 comments

Comments

@xuanyuxin
Copy link

xuanyuxin commented Dec 7, 2023

I followed the guideline to convert .idl file into required files and I check that the header file does contain the converted data types.

/*!
     * @brief This function sets a value in member dist
     * @param _dist New value for member dist
     */
    eProsima_user_DllExport void dist(
            float _dist);
    /*!
     * @brief This function returns the value of member dist
     * @return Value of member dist
     */
    eProsima_user_DllExport float dist() const;
    /*!
     * @brief This function returns a reference to member dist
     * @return Reference to member dist
     */
    eProsima_user_DllExport float& dist();

However, during the cmake process, there are following warnings:

Fast-DDS-python/install/fastrtps/include/fastdds/dds/core/LoanableTypedCollection.hpp:68: Warning 389: operator[]ignored (consider using %extend)
/Fast-DDS-python/install/fastrtps/include/fastdds/dds/core/LoanableTypedCollection.hpp:93: Warning 389: operator[]ignored (consider using %extend)
Fast-DDS-python/HelloWorld.h:199: Warning 509:Overloaded method HelloWorld::dist() effectively ignored,
Fast-DDS-python/HelloWorld.h:193: Warning 509: as itis shadowed by HelloWorld::dist() const.
Fast-DDS-python/HelloWorld.h:219: Warning 509:Overloaded method HelloWorld::bool() effectively ignored,
Fast-DDS-python/HelloWorld.h:213: Warning 509: as itis shadowed by HelloWorld::bool() const.
Fast-DDS-python/HelloWorld.h:234: Warning 509:Overloaded method HelloWorld::list(std::vector<float,std::allocator< float > > &&) effectively ignored,

When running the Publisher and Subscriber, there is the error:
AttributeError: 'HelloWorld' object has no attribute 'dist'

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

No branches or pull requests

1 participant