Project

General

Profile

Wiki » History » Version 1

Gianluca Corsini, 2022-09-06 20:09

1 1 Gianluca Corsini
{{toc}}
2
>
3
4
h2. = Introduction
5
>
6
This repository contains a @Gazebo@ plugin that allows simulating a chain of @Dynamixel@ motors connected together to the same serial bus.
7
It provides the same interface as the real one, i.e. a @pty@ port connection you can connect to, and it emulates completely the @Dynamixel Protocol 2.0@.
8
*However*, not all the functionalities have been implemented yet.
9
>
10
11
h3. Working functionalities
12
>
13
* Motor models implemented are @MX28T@, @MX64T@.
14
** A template for other motors is provided (@libdynamixel/src/motors/MOTOR.h@).
15
* Set position and velocities of the motor.
16
* Multiple instances of @dxsim-gazebo@ can be instantiated (*NB:* specify a different pty port for each!).
17
* Emulate @RAM@ and @EEPROM@ of each motor's Control Table (see online documentation).
18
** The number of entries is fully customizable through the motors' header files.
19
* Debug mode can be enabled from the @sdf@ file, independently for each motor.
20
>
21
22
h3. Not implemented functionalities
23
>
24
* Set effort.
25
* You can send PID gains, but they are not used.
26
27
h3. Assumptions
28
>
29
* The dynamics of the motor has been neglected.
30
31
h2. = Installation
32
>
33
* You need first to clone and install "libydnamixel":https://redmine.laas.fr/projects/libdynamixel
34
** Follow instructions reported in "readme.md":https://redmine.laas.fr/projects/libdynamixel/repository/libdynamixel/revisions/master/entry/readme.md file.
35
* Then clone @dxsim-gazebo@ repository.
36
** To install it, use the following commands:
37
<pre><code class="shell">
38
$ autoreconf -if
39
$ ./configure [--prefix=<installation_path>]
40
$ make && make install
41
</code></pre>
42
** Make sure that the folder @lib/gazebo@ at the installation location is contained in the environment variable @GAZEBO_PLUGIN_PATH@ in your @.bashrc@.
43
>
44
45
h2. How to use
46
>
47
In the @sdf@ file of your model, you have to insert the following lines for each instance you want to create:
48
49
<pre><code class="xml">
50
<plugin name="dxsim" filename="dxsim-gazebo.so">
51
      <pty>/tmp/pty-dynamixel</pty>
52
      <period>1e-3</period>
53
      <motors>
54
        <motor>
55
          <joint spin="ccw">arm_shoulder_pan_joint</joint>
56
          <eeprom>/home/gcorsini/dx_eeprom_id1</eeprom>
57
          <model>MX64T</model>
58
          <p0>0.0</p0>
59
          <v0>0.0</v0>
60
          <id>1</id>
61
          <noise>0</noise>
62
          <debug>0</debug>
63
        </motor>
64
      </motors>
65
    </plugin>
66
</code></pre>
67
68
>
69
If a @eeprom@ path has been specified, then at that location you should have a file looking like the following:
70
71
<pre>
72
model_number 311
73
model_info 0
74
firmware_ver 0
75
id 1
76
return_delay_time 0
77
operating_mode 1
78
secondary_id 255
79
homing_offset 0
80
temperature_limit 80
81
max_voltage_limit 160
82
min_voltage_limit 95
83
pwm_limit 885
84
current_limit 1941
85
acceleration_limit 32767
86
velocity_limit 1023
87
</pre>
88
89
+This file is an example of the @eeprom@ of a @MX64T@ motor.+
90
Changes to this file will lead to a runtime error in @dynamixel-gazebo@ if not performed properly; the EEPROM file should contain all the memory entries specified in the motor model's header file related to the EEPROM.
91
> For more details please visit the "online Dynamixel documentation":https://emanual.robotis.com/.
92
>> "MX Series documentation":https://emanual.robotis.com/docs/en/dxl/mx/.
93
94
h2. = Todo
95
>