test_client.cpp
Go to the documentation of this file.
00001 #include "ros/ros.h"
00002 #include "std_msgs/String.h"
00003 #include <brics_actuator/JointPositions.h>              //brics
00004 #include <brics_actuator/JointVelocities.h>             //brics
00005 
00006 #include <sstream>
00007 
00011 int main(int argc, char **argv)
00012 {
00023   ros::init(argc, argv, "test_client");
00024 
00030   ros::NodeHandle n;
00031 
00049  // ros::Publisher chatter_pub = n.advertise<brics_actuator::JointPositions>("/mapping_demonstrator_node/command_pos", 1);
00050     ros::Publisher chatter_pub = n.advertise<brics_actuator::JointVelocities>("/cob_3d_mapping_demonstrator_controller/command_vel", 1);
00051 
00052   ros::Rate loop_rate(20);
00053 
00059   while (ros::ok())
00060   {
00061     brics_actuator::JointVelocities jv;
00062     brics_actuator::JointValue jointVal1;
00063     jointVal1.timeStamp = ros::Time::now();
00064     jointVal1.joint_uri = "stepper";
00065     jointVal1.unit = "rad";
00066     jointVal1.value = 0.7;
00067 
00068         jv.velocities.push_back(jointVal1);
00069 
00070     jointVal1.joint_uri = "servo";
00071     jointVal1.value = 0.2;
00072 
00073         jv.velocities.push_back(jointVal1);
00074 
00075     chatter_pub.publish(jv);
00076 
00077     ros::spinOnce();
00078 
00079     loop_rate.sleep();
00080    }
00081 
00082 
00083   return 0;
00084 }


cob_3d_mapping_demonstrator
Author(s): Georg Arbeiter
autogenerated on Wed Aug 26 2015 11:03:46