[Rock-dev] assumptions in joint_dispatcher -- NamedVector

Janosch Machowinski Janosch.Machowinski at dfki.de
Fri Mar 7 13:39:12 CET 2014


On 07.03.2014 09:42, Steffen Planthaber wrote:
>
> This is not the issue, the issue is a config file containing this:
>
> config:
>     wheelRadius: 0.21
>     zeroPose:
>       names:
>         - FL_thorax
>         - FL_basal_a
>         - FL_basal_b
>         - FL_wheel_tilt
>         - FL_wheel_angleofattack
>         - FL_wheel_direction
>         - FL_wheel_speed
>         - FR_thorax
>         - FR_basal_a
>         - FR_basal_b
>         - FR_wheel_tilt
>         - FR_wheel_angleofattack
>         - FR_wheel_direction
>         - FR_wheel_speed
>         - RL_thorax
>         - RL_basal_a
>         - RL_basal_b
>         - RL_wheel_tilt
>         - RL_wheel_angleofattack
>         - RL_wheel_direction
>         - RL_wheel_speed
>         - RR_thorax
>         - RR_basal_a
>         - RR_basal_b
>         - RR_wheel_tilt
>         - RR_wheel_angleofattack
>         - RR_wheel_direction
>         - RR_wheel_speed
>         - man_motor1
>         - man_motor2
>         - man_motor3
>         - man_motor4
>         - man_motor5
>         - man_motor6
>
> For a motion controller, which then writes the values directly in cpp
> regardless of the configuration (e.g. joints["wheel"].speed = 0.5;).
> Here you would have also to define that wheel exists in the .yml, even
> when the controller was programmed to just control the "wheel" (the
> controller knows that wheel exists).
>
>
> So you define the Joint names twice:
> a) In the code when writing the values
> b) In the configuration above just to check whether the controller
> writes existent values (controller should know which joints to contol).
>
> For components where base::commands::joint values are written, the
> definition of joints is just doubled.
This example is a really bad one.
skid4_controll::SimpleController provides a good example of how
it should be done.
First of all you should not hard code the joint names in your controller.
They should be configurable. E.g.
joints[_leftMotorName.get()].speed = 0.0;
In this case you can configure the correct names everywhere in your system,
on motor driver level, and on controller level.
Greetings
     Janosch


-- 
  Dipl. Inf. Janosch Machowinski
  SAR- & Sicherheitsrobotik

  Universität Bremen
  FB 3 - Mathematik und Informatik
  AG Robotik
  Robert-Hooke-Straße 1
  28359 Bremen, Germany
  
  Zentrale: +49 421 178 45-6611
  
  Besuchsadresse der Nebengeschäftstelle:
  Robert-Hooke-Straße 5
  28359 Bremen, Germany
  
  Tel.:    +49 421 178 45-6614
  Empfang: +49 421 178 45-6600
  Fax:     +49 421 178 45-4150
  E-Mail:  jmachowinski at informatik.uni-bremen.de

  Weitere Informationen: http://www.informatik.uni-bremen.de/robotik



More information about the Rock-dev mailing list