PDA

View Full Version : Example yaml file for arbotix_python io sensors?



Pi Robot
12-20-2011, 07:49 PM
Hi Fergs,

I would like to attach some analog and digital sensors to my ArbotiX and read them using arbotix_python under ROS. However, on your ROS Wiki page for io (http://www.ros.org/wiki/arbotix_python/io), the sample yaml file is missing at the bottom of the page. Would you give us a short example of how to define a digital and analog sensor in the yaml file?

Thanks!
patrick

lnxfergy
12-20-2011, 08:05 PM
See http://code.google.com/p/vanadium-ros-pkg/source/browse/trunk/mini_max/mini_max_defs/params/mini_max.yaml

This defines two digital inputs (value:1 turns on the pull up resistor, the switch connects IO to ground).

-Fergs

Pi Robot
12-20-2011, 08:32 PM
So to get the reading from an analog voltage sensor on analog pin 6, I used:

analog_sensors: {
voltage: {pin: 6, rate: 1}
}

Is that correct? I see a value on /arbotix/voltage so I think I guessed right.

--patrick

lnxfergy
12-20-2011, 11:10 PM
Yep, that's it, and it will stream at 1hz (approximately, can vary by about 10-15% depending on the load on the serial port)

-Fergs

raulsq
02-06-2014, 05:25 AM
Hi,

I saw that you are talking about yaml files and i would like to ask you if you have already create a yaml file for a robot with any joint with two servos.

I have a pantomX reactor that i am using on a ROS environment with the arbotix_python package and i need this file to define my robot.

I had a look on the ones that you mean here but i did not find anyone with these features. It would be really usefull for me any advice! Thanks in advance!

Greetings,
Raul.

Pi Robot
02-06-2014, 08:27 AM
This is the yaml file I use with a 6-joint Dynamixel arm + 1-joint gripper and a 2-joint pan-and-tilt head:


port: /dev/ttyUSB0
baud: 115200
rate: 20
sync_write: True
sync_read: True
read_rate: 20
write_rate: 20


joints: {
head_pan_joint: {id: 1, neutral: 512, max_speed: 100, min_angle: -145, max_angle: 145, invert: False},
head_tilt_joint: {id: 2, neutral: 512, max_speed: 100, min_angle: -90, max_angle: 90, invert: False},
right_arm_shoulder_pan_joint: {id: 3, neutral: 512, max_speed: 100, min_angle: -145, max_angle: 145, invert: False},
right_arm_shoulder_lift_joint: {id: 4, neutral: 512, max_speed: 100, invert: True},
right_arm_shoulder_roll_joint: {id: 5, neutral: 512, max_speed: 100, invert: True},
right_arm_elbow_flex_joint: {id: 6, neutral: 512, max_speed: 100, min_angle: -90, max_angle: 90, invert: True},
right_arm_forearm_flex_joint: {id: 7, neutral: 512, max_speed: 100, min_angle: -110, max_angle: 110, invert: True},
right_arm_wrist_flex_joint: {id: 8, neutral: 512, max_speed: 100, min_angle: -90, max_angle: 90, invert: True},
right_gripper_finger_joint: {id: 9, neutral: 512, max_speed: 100, min_angle: -20, max_angle: 25, invert: False}
}


controllers: {
base_controller: {type: diff_controller, base_frame_id: base_footprint, base_width: 0.26, ticks_meter: 4100, Kp: 12, Kd: 12, Ki: 0, Ko: 50, accel_limit: 1.0 },
right_arm_controller: {onboard: False, action_name: right_arm_controller/follow_joint_trajectory, type: follow_controller, joints: [right_arm_shoulder_pan_joint, right_arm_shoulder_lift_joint, right_arm_shoulder_roll_joint, right_arm_elbow_flex_joint, right_arm_forearm_flex_joint, right_arm_wrist_flex_joint] },
}

raulsq
02-06-2014, 08:56 AM
Thank you very much for your answer!

Maybe i did not explain good when i said that i have two servos in the same joint.
I wanted to mean that the two servos are in parallel being dependent to each other. There is two servos instead of one in order to be stronger, not to be able to have more degree of freedom. It is like you have two servos on the joint "right_arm_shoulder_pan_joint".

Greetings,
Raul.

Pi Robot
02-06-2014, 09:07 AM
Ah, I see what you mean. Unfortunately I have never used a two-servo joint so I'm not sure how to handle that using arbotix_python. Sorry!

--patrick