virtual_shadowhand_node.cpp
Go to the documentation of this file.
1 
30 #include <ros/ros.h>
31 
32 #include <boost/thread/thread.hpp>
33 #include <boost/smart_ptr.hpp>
34 
35 #include "sr_hand/sr_subscriber.h"
36 #include "sr_hand/sr_publisher.h"
39 
40 
41 using ros::NodeHandle;
42 using ros::ok;
48 
49 
51 // MAIN //
53 
55 {
56  while (ok())
57  {
58  shadowhand_diag->publish();
59  }
60 }
61 
63 {
64  while (ok())
65  {
66  shadowhand_pub->publish();
67  }
68 }
69 
70 
82 int main(int argc, char **argv)
83 {
84  ros::init(argc, argv, "shadowhand");
85  NodeHandle n;
86 
88  boost::shared_ptr<SRSubscriber> shadowhand_subscriber(new SRSubscriber(virt_sh));
89 
90 
91  boost::shared_ptr<SRPublisher> shadowhand_pub(new SRPublisher(virt_sh));
93 
94  boost::thread thrd1(boost::bind(&run_diagnotics, shadowhand_diag));
95  boost::thread thrd2(boost::bind(&run_publisher, shadowhand_pub));
96  thrd1.join();
97  thrd2.join();
98 
99  return 0;
100 }
int main(int argc, char **argv)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
The Diagnosticer is a ROS publisher which publishes diagnostic data regarding the Dextrous Hand or th...
The Virtual Shadowhand can be used as a simulator. As both the real hand and the virtual hand are chi...
void run_publisher(boost::shared_ptr< SRPublisher > shadowhand_pub)
This class reads and publishes data concerning the shadowhand / shadowarm. To publish those data...
ROSCPP_DECL bool ok()
void run_diagnotics(boost::shared_ptr< SRDiagnosticer > shadowhand_diag)
This ROS subscriber is used to issue commands to the hand / arm, from sending a set of targets...
The Virtual Shadowhand can be used as a simulator. As both the real hand and the virtual hand are chi...


sr_hand
Author(s): Ugo Cupcic
autogenerated on Tue Oct 13 2020 03:55:53