diff --git a/src/ur5e_arm.cpp b/src/ur5e_arm.cpp index b19e920..47fd5f7 100644 --- a/src/ur5e_arm.cpp +++ b/src/ur5e_arm.cpp @@ -108,6 +108,7 @@ void UR5eArm::reconfigure(const Dependencies& deps, const ResourceConfig& cfg) { // extract relevant attributes from config host = find_config_attribute(cfg, "host"); speed = find_config_attribute(cfg, "speed_degs_per_sec") * (M_PI / 180.0); + acceleration = find_config_attribute(cfg, "acceleration_degs_per_sec2") * (M_PI / 180.0); } std::vector UR5eArm::get_joint_positions(const ProtoStruct& extra) { @@ -194,7 +195,6 @@ void UR5eArm::keep_alive() { mu.lock(); read_and_noop(); mu.unlock(); - usleep(NOOP_DELAY); } } @@ -236,7 +236,7 @@ void UR5eArm::move(std::vector waypoints) { BOOST_LOG_TRIVIAL(debug) << "generating trajectory with max speed: " << speed * (180.0 / M_PI) << std::endl; Eigen::VectorXd max_acceleration(6); Eigen::VectorXd max_velocity(6); - max_acceleration << 1.0, 1.0, 1.0, 1.0, 1.0, 1.0; + max_acceleration << acceleration, acceleration, acceleration, acceleration, acceleration, acceleration; max_velocity << speed, speed, speed, speed, speed, speed; std::vector p; diff --git a/src/ur5e_arm.hpp b/src/ur5e_arm.hpp index c36de91..e916568 100644 --- a/src/ur5e_arm.hpp +++ b/src/ur5e_arm.hpp @@ -116,4 +116,5 @@ class UR5eArm : public Arm, public Reconfigurable { // variables specified by ResourceConfig and set through reconfigure std::string host; double speed; + double acceleration; };