collision1_name not a member of gazebo_msgs/ContactState [closed]

asked 2013-01-26 18:06:19 -0500

prasanna.kumar gravatar image

updated 2014-01-28 17:15:00 -0500

ngrennan gravatar image

Hi,

I am writing a program read the data from a contact sensor in Gazebo. When I make the package, I get this error

/home/crichton/ros_workspace/angen_cognitive_environment/angen_apps/src/test_sensor.cpp: In member function ‘void test_sensor::callback(const ConstPtr&)’:
/home/crichton/ros_workspace/angen_cognitive_environment/angen_apps/src/test_sensor.cpp:32:25: error: ‘const struct gazebo_msgs::ContactState_<std::allocator<void> >’ has no member named ‘collision1_name’

My code is this

void test_sensor::callback(const gazebo_msgs::ContactState::ConstPtr& DetectState)
{       
        if(DetectState->collision1_name.compare("base_footprint_geom_plate_1_link"))
           cout<<"Contact with the robot"<<endl;
}

The api lists collision1_name as its member. What's the problem here ? or Am I making a mistake ?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2015-10-14 16:13:31.867200