-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from tinymovr/develop
Finalize Tinymovr ROS ahead of release
- Loading branch information
Showing
58 changed files
with
2,647 additions
and
649 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
industrial_ci: | ||
strategy: | ||
matrix: | ||
env: | ||
- {ROS_DISTRO: noetic, ROS_REPO: main} | ||
- {ROS_DISTRO: melodic, ROS_REPO: main} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: 'ros-industrial/industrial_ci@master' | ||
env: ${{matrix.env}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,76 @@ | ||
__Tinymovr ROS Hardware Interface__ | ||
|
||
https://catkin-tools.readthedocs.io/en/latest/installing.html | ||
A ROS package that provides hardware interfacing for Tinymovr devices. This interface allows for seamless integration of Tinymovr devices with ROS-based robotic systems, offering joint state and control through ROS topics and services. | ||
|
||
https://www.howtoinstall.me/ubuntu/18-04/liburdfdom-headers-dev/ | ||
## Features | ||
- Real-time reading of joint positions, velocities, and efforts. | ||
- Ability to send joint command setpoints. | ||
- Error handling and robust exception management. | ||
- Compatible with standard ROS controllers, enabling a plug-and-play experience. | ||
|
||
https://github.com/siposcsaba89/socketcan-cpp | ||
## Prerequisites | ||
|
||
https://stackoverflow.com/questions/17808084/fatal-error-libudev-h-no-such-file-or-directory | ||
- ROS (Robot Operating System) - Tested with ROS Noetic, but should be compatible with other versions. | ||
- SocketCAN tools and utilities installed. | ||
- Tinymovr devices properly set up and calibrated. | ||
|
||
## Installation | ||
|
||
1. Navigate to your catkin workspace's source folder: | ||
|
||
```bash | ||
cd ~/catkin_ws/src/ | ||
``` | ||
|
||
2. Clone the repository: | ||
|
||
```bash | ||
git clone [email protected]:tinymovr/Tinymovr-ROS.git | ||
``` | ||
|
||
3. Build your catkin workspace: | ||
|
||
```bash | ||
cd ~/catkin_ws/ | ||
catkin_make | ||
``` | ||
|
||
4. Source the workspace: | ||
|
||
```bash | ||
source devel/setup.bash | ||
``` | ||
|
||
## Run the Diffbot demo! | ||
|
||
1. Ensure your Tinymovr instances are calibrated and well tuned, test functioning using Tinymovr Studio or CLI. | ||
|
||
2. Configure your hardware in `config/hardware.yaml` and diff drive config in `config/diff_drive_config.yaml` | ||
|
||
3. Start the `tinymovr_diffbot_demo_node` node: | ||
|
||
```bash | ||
roslaunch tinymovr_ros tinymovr_diffbot_demo_node.launch | ||
``` | ||
|
||
4. Spin up a keyboard teleop and drive your robot: | ||
|
||
```bash | ||
rosrun teleop_twist_keyboard teleop_twist_keyboard.py cmd_vel:=/diff_drive_controller/cmd_vel | ||
``` | ||
|
||
## Configuration | ||
|
||
To customize the behavior of the Tinymovr ROS, adjust the parameters in the `config` directory. Here, you can set specifics about each joint, including joint names, IDs, and other parameters relevant to your hardware setup. | ||
|
||
## API Documentation | ||
|
||
Further details about the API and individual functions can be found in the generated Doxygen documentation. Please refer to the documentation for advanced use cases. | ||
|
||
## Contributing | ||
|
||
Contributions to improve and expand the functionality of Tinymovr ROS are welcome! Please open an issue or submit a pull request on the GitHub repository. | ||
|
||
## License | ||
|
||
This package is licensed under the [MIT License](LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
# All paths relative to this config file | ||
|
||
generators: | ||
generator_cpp: | ||
enabled: true | ||
paths: | ||
output_helpers: ./include/tinymovr/helpers.hpp | ||
output_header: ./include/tinymovr/tinymovr.hpp | ||
output_impl: ./src/tinymovr/tinymovr.cpp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
diff_drive_controller: | ||
type: "diff_drive_controller/DiffDriveController" | ||
left_wheel: "wheel_1" | ||
right_wheel: "wheel_2" | ||
pose_covariance_diagonal: [0.001, 0.001, 1000000.0, 1000000.0, 1000000.0, 1000.0] | ||
twist_covariance_diagonal: [0.001, 0.001, 1000000.0, 1000000.0, 1000000.0, 1000.0] | ||
publish_rate: 50.0 | ||
wheel_separation: 0.4 | ||
wheel_radius: 0.12 | ||
cmd_vel_timeout: 0.5 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
tinymovr_joint_iface: | ||
joints: | ||
wheel_2: | ||
# hardware ID of the actuator | ||
id: 2 | ||
offset: 3.14159265359 # in rad | ||
delay_us: 200 | ||
#max-speed: 4.0 # in rad/s | ||
rads_to_ticks: 14.323944878 # how many ticks in a rad | ||
command_interface: velocity | ||
wheel_1: | ||
# hardware ID of the actuator | ||
id: 1 | ||
offset: 3.14159265359 # in rad | ||
delay_us: 200 | ||
#max-speed: 4.0 # in rad/s | ||
rads_to_ticks: 14.323944878 # how many ticks in a rad | ||
command_interface: velocity | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,4 +60,4 @@ namespace scpp | |
std::string m_interface; | ||
SocketMode m_socket_mode; | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* This file was automatically generated using Avlos. | ||
* https://github.com/tinymovr/avlos | ||
* | ||
* Any changes to this file will be overwritten when | ||
* content is regenerated. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <helpers.hpp> | ||
|
||
class Can_ : Node | ||
{ | ||
public: | ||
|
||
Can_(uint8_t _can_node_id, send_callback _send_cb, recv_callback _recv_cb, delay_us_callback _delay_us_cb, uint32_t _delay_us_value): | ||
Node(_can_node_id, _send_cb, _recv_cb, _delay_us_cb, _delay_us_value) {}; | ||
uint32_t get_rate(void); | ||
void set_rate(uint32_t value); | ||
uint32_t get_id(void); | ||
void set_id(uint32_t value); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* This file was automatically generated using Avlos. | ||
* https://github.com/tinymovr/avlos | ||
* | ||
* Any changes to this file will be overwritten when | ||
* content is regenerated. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <helpers.hpp> | ||
#include <can.hpp> | ||
|
||
class Comms_ : Node | ||
{ | ||
public: | ||
|
||
Comms_(uint8_t _can_node_id, send_callback _send_cb, recv_callback _recv_cb, delay_us_callback _delay_us_cb, uint32_t _delay_us_value): | ||
Node(_can_node_id, _send_cb, _recv_cb, _delay_us_cb, _delay_us_value) | ||
, can(_can_node_id, _send_cb, _recv_cb, _delay_us_cb, _delay_us_value) {}; | ||
Can_ can; | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* This file was automatically generated using Avlos. | ||
* https://github.com/tinymovr/avlos | ||
* | ||
* Any changes to this file will be overwritten when | ||
* content is regenerated. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <helpers.hpp> | ||
#include <position.hpp> | ||
#include <velocity.hpp> | ||
#include <current.hpp> | ||
#include <voltage.hpp> | ||
|
||
class Controller_ : Node | ||
{ | ||
public: | ||
|
||
Controller_(uint8_t _can_node_id, send_callback _send_cb, recv_callback _recv_cb, delay_us_callback _delay_us_cb, uint32_t _delay_us_value): | ||
Node(_can_node_id, _send_cb, _recv_cb, _delay_us_cb, _delay_us_value) | ||
, position(_can_node_id, _send_cb, _recv_cb, _delay_us_cb, _delay_us_value) | ||
, velocity(_can_node_id, _send_cb, _recv_cb, _delay_us_cb, _delay_us_value) | ||
, current(_can_node_id, _send_cb, _recv_cb, _delay_us_cb, _delay_us_value) | ||
, voltage(_can_node_id, _send_cb, _recv_cb, _delay_us_cb, _delay_us_value) {}; | ||
uint8_t get_state(void); | ||
void set_state(uint8_t value); | ||
uint8_t get_mode(void); | ||
void set_mode(uint8_t value); | ||
uint8_t get_warnings(void); | ||
uint8_t get_errors(void); | ||
Position_ position; | ||
Velocity_ velocity; | ||
Current_ current; | ||
Voltage_ voltage; | ||
void calibrate(); | ||
void idle(); | ||
void position_mode(); | ||
void velocity_mode(); | ||
void current_mode(); | ||
float set_pos_vel_setpoints(float pos_setpoint, float vel_setpoint); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* This file was automatically generated using Avlos. | ||
* https://github.com/tinymovr/avlos | ||
* | ||
* Any changes to this file will be overwritten when | ||
* content is regenerated. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <helpers.hpp> | ||
|
||
class Current_ : Node | ||
{ | ||
public: | ||
|
||
Current_(uint8_t _can_node_id, send_callback _send_cb, recv_callback _recv_cb, delay_us_callback _delay_us_cb, uint32_t _delay_us_value): | ||
Node(_can_node_id, _send_cb, _recv_cb, _delay_us_cb, _delay_us_value) {}; | ||
float get_Iq_setpoint(void); | ||
void set_Iq_setpoint(float value); | ||
float get_Id_setpoint(void); | ||
float get_Iq_limit(void); | ||
void set_Iq_limit(float value); | ||
float get_Iq_estimate(void); | ||
float get_bandwidth(void); | ||
void set_bandwidth(float value); | ||
float get_Iq_p_gain(void); | ||
float get_max_Ibus_regen(void); | ||
void set_max_Ibus_regen(float value); | ||
float get_max_Ibrake(void); | ||
void set_max_Ibrake(float value); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* This file was automatically generated using Avlos. | ||
* https://github.com/tinymovr/avlos | ||
* | ||
* Any changes to this file will be overwritten when | ||
* content is regenerated. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <helpers.hpp> | ||
|
||
class Encoder_ : Node | ||
{ | ||
public: | ||
|
||
Encoder_(uint8_t _can_node_id, send_callback _send_cb, recv_callback _recv_cb, delay_us_callback _delay_us_cb, uint32_t _delay_us_value): | ||
Node(_can_node_id, _send_cb, _recv_cb, _delay_us_cb, _delay_us_value) {}; | ||
float get_position_estimate(void); | ||
float get_velocity_estimate(void); | ||
uint8_t get_type(void); | ||
void set_type(uint8_t value); | ||
float get_bandwidth(void); | ||
void set_bandwidth(float value); | ||
bool get_calibrated(void); | ||
uint8_t get_errors(void); | ||
|
||
}; |
Oops, something went wrong.