lowbandwidth_trajectory_follower.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017, 2018 Jarek Potiuk (low bandwidth trajectory follower)
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include <inttypes.h>
20 #include <array>
21 #include <atomic>
22 #include <cstddef>
23 #include <cstring>
24 #include <string>
25 #include <thread>
26 #include <vector>
27 #include "ur_modern_driver/log.h"
31 
33 {
34 private:
35  std::atomic<bool> running_;
36  std::array<double, 6> last_positions_;
39 
42 
43  std::string program_;
44 
45  bool execute(const std::array<double, 6> &positions, const std::array<double, 6> &velocities, double sample_number,
46  double time_in_seconds);
47 
48 public:
49  LowBandwidthTrajectoryFollower(URCommander &commander, std::string &reverse_ip, int reverse_port, bool version_3);
50 
51  bool start();
52  bool execute(std::vector<TrajectoryPoint> &trajectory, std::atomic<bool> &interrupt);
53  void stop();
54 
56 };
bool execute(const std::array< double, 6 > &positions, const std::array< double, 6 > &velocities, double sample_number, double time_in_seconds)
LowBandwidthTrajectoryFollower(URCommander &commander, std::string &reverse_ip, int reverse_port, bool version_3)


ur_modern_driver
Author(s): Thomas Timm Andersen, Simon Rasmussen
autogenerated on Fri Jun 26 2020 03:37:00