does any body have any idea
Exactly what the error says. The function you are calling is a non-static function, so you can only use this function when it's part of a already created object.

Code:
AgentActionComponent myObject;

Vec3f currentPos = myObject.getEntityPosition (m_characterID2);