Publisher/Subscriber Node for Nao [closed]
Is there any default template for me to write publisher/subscriber node for the nao? For example, what at the libraries that is needed and so forth..
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Is there any default template for me to write publisher/subscriber node for the nao? For example, what at the libraries that is needed and so forth..
See this: http://wiki.ros.org/Robots/Nao
And to write a publisher/subscriber look here: http://wiki.ros.org/roscpp/Overview/P... This works for every robot.
I got it working by using this code. This is for subscribing to the foot bumpers. For subscribing to other sensors should be the same concept.
#include "ros/ros.h"
#include "nao_msgs/Bumper.h"
void bumperCallback(const nao_msgs::Bumper::ConstPtr &msg)
{
ROS_INFO("I heard: %u and %u", msg->bumper, msg->state);
}
int main(int argc, char **argv)
{
ros::init(argc, argv, "nao_bumper_listener");
ros:: NodeHandle n;
ros::Subscriber bump= n.subscribe("bumper", 1000, bumperCallback);
ros::spin();
return 0;
}
Asked: 2014-02-22 19:16:07 -0600
Seen: 523 times
Last updated: Mar 10 '14
adding NaoQI to the PYTHONPATH
nao_driver and joint_states with NaoQI 1.12
ROS doesn´t run into NAO robot.
Launching nao_driver. Error with nao_msgs [closed]
Cross-Compiling ROS fuerte for a Nao v4. roscore doesnt run
Error importing Naoqi in python [closed]
Installation for Aldebaran Robotics Nao for RosJava
NAO or ROMEO aldebran robot in V-rep