error: expected primary-expression before ‘const’

This is the code snippet that's giving this error. The line has been marked in the code snippet.


class ignition::gazebo::systems::amclPrivate
    public: Model model{kNullEntity};

    public: bool updateAmclPose(const EntityComponentManager &_ecm);

    public: std::string fixed_frame_;

    public: std::string robot_frame_;

    public: double rate_;


void amcl::Configure(const Entity &_entity,
    const std::shared_ptr<const sdf::Element> &_sdf,
    EntityComponentManager &_ecm,
    EventManager &_eventMgr)
amcl_nh_.setCallbackQueue(& amcl_queue_);
    amcl_pub_ = amcl_nh_.advertise<geometry_msgs::PoseWithCovarianceStamped>("amcl",1,true);

    thread_ptr_ = std::make_shared<std::thread>();
                // Set process rate
                ros::Rate r(this->rate_);
                while (this->amcl_nh_.ok())
        this->updateAmclPose(const EntityComponentManager &_ecm); ---This line gives error





error: expected primary-expression before ‘const’ this->updateAmclPose(const EntityComponentManager &_ecm);

PS: The code snippet given above is a minimal example. Full implementation can be found here

PS: To avoid confusion, I haven't pasted full code. Can anybody suggest a solution?


Read more here:

Content Attribution

This content was originally published by Adwait at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: