Wiki » History » Revision 2
Revision 1 (Gianluca Corsini, 2022-09-06 20:09) → Revision 2/7 (Gianluca Corsini, 2022-09-06 20:09)
{{toc}}
>
h2. = Introduction
>
This repository contains a @Gazebo@ plugin that allows simulating a chain of @Dynamixel@ motors connected together to the same serial bus.
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@.
*However*, not all the functionalities have been implemented yet.
>
h3. Working functionalities
>
* Motor models implemented are @MX28T@, @MX64T@.
** A template for other motors is provided (@libdynamixel/src/motors/MOTOR.h@).
* Set position and velocities of the motor.
* Multiple instances of @dxsim-gazebo@ can be instantiated (*NB:* specify a different pty port for each!).
* Emulate @RAM@ and @EEPROM@ of each motor's Control Table (see online documentation).
** The number of entries is fully customizable through the motors' header files.
* Debug mode can be enabled from the @sdf@ file, independently for each motor.
>
h3. Not implemented functionalities
>
* Set effort.
* You can send PID gains, but they are not used.
h3. Assumptions
>
* The dynamics of the motor has been neglected.
h2. = Installation
>
* You need first to clone and install "libydnamixel":https://redmine.laas.fr/projects/libdynamixel
** Follow instructions reported in "readme.md":https://redmine.laas.fr/projects/libdynamixel/repository/libdynamixel/revisions/master/entry/readme.md file.
* Then clone @dxsim-gazebo@ repository.
** To install it, use the following commands:
<pre><code class="shell">
$ autoreconf -if
$ ./configure [--prefix=<installation_path>]
$ make && make install
</code></pre>
** Make sure that the folder @lib/gazebo@ at the installation location is contained in the environment variable @GAZEBO_PLUGIN_PATH@ in your @.bashrc@.
>
h2. = How to use
>
In the @sdf@ file of your model, you have to insert the following lines for each instance you want to create:
<pre><code class="xml">
<plugin name="dxsim" filename="dxsim-gazebo.so">
<pty>/tmp/pty-dynamixel</pty>
<period>1e-3</period>
<motors>
<motor>
<joint spin="ccw">arm_shoulder_pan_joint</joint>
<eeprom>/home/gcorsini/dx_eeprom_id1</eeprom>
<model>MX64T</model>
<p0>0.0</p0>
<v0>0.0</v0>
<id>1</id>
<noise>0</noise>
<debug>0</debug>
</motor>
</motors>
</plugin>
</code></pre>
>
If a @eeprom@ path has been specified, then at that location you should have a file looking like the following:
<pre>
model_number 311
model_info 0
firmware_ver 0
id 1
return_delay_time 0
operating_mode 1
secondary_id 255
homing_offset 0
temperature_limit 80
max_voltage_limit 160
min_voltage_limit 95
pwm_limit 885
current_limit 1941
acceleration_limit 32767
velocity_limit 1023
</pre>
+This file is an example of the @eeprom@ of a @MX64T@ motor.+
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.
> For more details please visit the "online Dynamixel documentation":https://emanual.robotis.com/.
>> "MX Series documentation":https://emanual.robotis.com/docs/en/dxl/mx/.
h2. = Todo
>