Teacher code
This commit is contained in:
parent
0af8197c38
commit
f722004317
|
|
@ -0,0 +1,25 @@
|
|||
void Callback(msg) {
|
||||
//create empty vector
|
||||
//fill it with msg
|
||||
//call sendTargetJointPosition
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
ros::init(argc, argv, "poppy_ros");
|
||||
ros::NodeHandle nh;
|
||||
ros::Publisher pub = nh.advertise <msg>("joint_position", 1);
|
||||
ros::Subscriber sub = nh.subscribe("joint_cmd", 1, Callback);
|
||||
ros::Rate loopRate(10);
|
||||
|
||||
while (ros::ok()) {
|
||||
//create a msg
|
||||
//call readCurrentJointPosition
|
||||
//fill msg
|
||||
//publish it
|
||||
|
||||
ros::spinOnce();
|
||||
loopRate.sleep();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
void Callback(msg) {
|
||||
//create empty vector
|
||||
//fill it with msg
|
||||
//call sendTargetJointPosition
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
ros::init(argc, argv, "poppy_ros");
|
||||
ros::NodeHandle nh;
|
||||
ros::Publisher pub = nh.advertise <msg>("joint_position", 1);
|
||||
ros::Subscriber sub = nh.subscribe("joint_cmd", 1, Callback);
|
||||
ros::Rate loopRate(10);
|
||||
|
||||
while (ros::ok()) {
|
||||
//create a msg
|
||||
//call readCurrentJointPosition
|
||||
//fill msg
|
||||
//publish it
|
||||
|
||||
ros::spinOnce();
|
||||
loopRate.sleep();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Reference in New Issue