22 int main (
int argc,
char* argv[])
38 arm_group->initNodes();
43 config.profile_acceleration = 0.2;
44 config.profile_velocity = 0.2;
45 config.use_relative_targets =
false;
46 config.change_set_immediately =
true;
47 config.use_blending =
true;
49 arm_group->setupProfilePositionMode(config);
51 std::vector<float> targets (6, 0.0);
54 arm_group->enableNodes();
56 arm_group->setTarget(targets);
60 std::vector<bool> foo;
67 catch (
const std::exception& e)
76 if (arm_group->isTargetReached(foo))
83 arm_group->disableNodes();
bool initialize(int &argc, char *argv[], bool remove_read_arguments)
Configuration parameters for a Profile_Position_Mode according to CiA DSP-402 V1.1 section 12...
#define LOGGING_INFO(streamname, arg)
This class gives a device specific interface for Schunk Powerballs, as they need some "special" treat...
The DS402Group class is the base class for canOpen devices implementing the DS402 device protocol (mo...
#define LOGGING_ERROR(streamname, arg)
unsigned int sleep(unsigned int seconds)
The CanOpenController class is the main entry point for any calls to the canOpen System.
boost::shared_ptr< NodeT > getNode(const uint8_t node_id)
Returns a shared pointer handle to a node.
ThreadStream & endl(ThreadStream &stream)
int main(int argc, char *argv[])
boost::shared_ptr< GroupT > getGroup(const std::string &index="default")
Returns a shared pointer to the group with a given index if possible.
void addNode(const uint8_t node_id, const std::string &group_name="default")
Adds a new node to a group. If the group is not found (e.g. it was not created before), nothing will be done.
void syncAll()
Downloads all the RPDOs, Sends a Sync and Uploads all the TPDOs.
int usleep(unsigned long useconds)