RIVeR-Lab / epos_hardware

Other
12 stars 39 forks source link

Could not find motor #8

Closed Milliau closed 8 years ago

Milliau commented 8 years ago

Hey, I'm new at ROS and have Problems using epos_hardware. I've installed Ubuntu 14.04 und ROS Indigo. When i make roslaunch epos_hardware example.launch I get 3 ERRORS

[ERROR] [1471869000.781608269]: Could not find motor
[ERROR] [1471869000.781966120]: Could not configure motor: my_joint_actuator
[FATAL] [1471869000.782143814]: Failed to initialize motors

I changed the serial number in the example.yamle and tried it with 0x and without.

When I try to make it with rosrun epos_hardware epos_hardware_node my_joint_actuator I get also 3 errors:

[ INFO] [1471941494.237950364]: Loading EPOS: my_joint_actuator
[ERROR] [1471941494.258203422]: You must specify an actuator name
[ERROR] [1471941494.262260359]: You must specify a serial number
[ERROR] [1471941494.265750152]: You must specify an operation mode

Where i define the motor name? I think's it in the example files, is this right?

Thanks for your help

velinddimitrov commented 8 years ago

Can you post the urdf, yaml, and launch files you are using? Yes, it is in the example files. It looks like your yaml file is not being found.

Milliau commented 8 years ago

Yes, it's the same code like her [(https://github.com/RIVeR-Lab/epos_hardware/tree/indigo-devel/epos_hardware/launch)]

The launch file:

<launch>

<param name="robot_description" textfile="$(find epos_hardware)/launch/example.urdf" /> <node name="epos_hardware" pkg="epos_hardware" type="epos_hardware_node" args="my_joint_actuator"> <rosparam command="load" file="$(find epos_hardware)/launch/example.yaml" /> </node>

<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="joint_state_controller velocity_controller"/> <param name="velocity_controller/type" value="velocity_controllers/JointVelocityController" /> <param name="velocity_controller/joint" value="test_joint" /> <param name="position_controller/type" value="position_controllers/JointPositionController" /> <param name="position_controller/joint" value="test_joint" /> <param name="joint_state_controller/type" value="joint_state_controller/JointStateController" /> <param name="joint_state_controller/publish_rate" value="50" /> </launch> The URDF `<?xml version="1.0"?>

transmission_interface/SimpleTransmission hardware_interface/VelocityJointInterface 1000 ` THE YAML `# Time in seconds` `# Current in amps` `# position, velocity, and acceleration in device units` `my_joint_actuator:` `actuator_name: 'test_joint_actuator'` `serial_number: '0x662080006747'` `operation_mode: 'profile_velocity'` `clear_faults:` `motor:` `type: 10` `dc_motor:` `nominal_current: 9.650` `max_output_current: 10.500` `thermal_time_constant: 2.11` `sensor:` `type: 1` `incremental_encoder:` `resolution: 500` `inverted_polarity: false` `safety:` `max_following_error: 20000` `max_profile_velocity: 12000` `max_acceleration: 15000` `position_profile:` `velocity: 10000` `acceleration: 8000` `deceleration: 9000` `velocity_profile:` `acceleration: 8000` `deceleration: 9000` `
velinddimitrov commented 8 years ago

Try getting rid of the 0x in front of the motor serial number. You are communicating over USB, correct?

Milliau commented 8 years ago

I tryed it with 0x an without. I Communication with USB when i make rosrun epos_hardware list_devices I can See my Node and find THW serial Number. So i think The Communication works

JimmyDaSilva commented 8 years ago

@Milliau, I advise you to keep running roslaunch epos_hardware example.launch but with a small modification. In that launch file example.launch : https://github.com/RIVeR-Lab/epos_hardware/blob/indigo-devel/epos_hardware/launch/example.launch#L3, just add output="screen" to the node epos_hardware.

So it should be like this: <node name="epos_hardware" pkg="epos_hardware" type="epos_hardware_node" args="my_joint_actuator" output="screen">

That way you will see the ROS_INFO and ROS_ERROR while launching correctly your motor.

Milliau commented 8 years ago

@JimmyDaSilva Thanks for the idea, i think the Problem is the CanOpen Communication, i tryed to configure it with EPOS Studio but it not work, to you know if it is necessary to configure the controller in Epos Studio? I have 2 Motors, they are connected to each other by CAn and the Node 1 is connected by USB to the computer

JimmyDaSilva commented 8 years ago

@Milliau Yes you should configure the card in Epos Studio firts. You need to configure the communication, and the controller with the tuning. It's going to save the parameters on the card. If you are not able to make the motor move with Epos Studio it's almost certain that you won't be able to move it with the ROS node.

Milliau commented 8 years ago

@JimmyDaSilva I can move them in Epos but not together, so i will try to get the CanOpen Communcation work,... Thanks for your help.

velinddimitrov commented 8 years ago

As Jimmy said, you have to get them working in Windows first. I know that getting the CAN ID's set properly took us awhile to figure out. Are you setting them using the DIP switches on the EPOS2? What are they set to?

Milliau commented 8 years ago

I solved the problem by changing the Parameters, thanks for your help

grafoteka commented 8 years ago

Hello @Milliau , please, could you tell me which parameters did you change? I'm having problems with the packages too.

$ rosrun epos_hardware epos_hardware_node my_joint_actuator [ INFO] [1473763425.747526820]: Loading EPOS: my_joint_actuator [ERROR] [1473763425.752502324]: You must specify an actuator name [ERROR] [1473763425.753633507]: You must specify a serial number [ERROR] [1473763425.754717761]: You must specify an operation mode [ INFO] [1473763425.754763438]: [ INFO] [1473763425.824794032]: Initializing Motors [ERROR] [1473763425.824924309]: Not Initializing: 0x0, initial construction failed [ERROR] [1473763425.824983283]: Could not configure motor: my_joint_actuator [FATAL] [1473763425.825029568]: Failed to initialize motors

Thank you very much

Milliau commented 8 years ago

@grafoteka so I found out that some parameter have a max. Number, so the niminal current can't be over 10.000.

grafoteka commented 8 years ago

Thank you for your reply @Milliau I have set the max_output_current to 9.0 as my datasheet indicates. I have a little progress and now I have the next warnings and errors:

[ INFO] [1473784916.252868236]: Found Motor

[ WARN] [1473784916.295778307]: No torque constant specified, you can supply one using the 'torque_constant' parameter

[ INFO] [1473784916.295879158]: Configuring Motor

[ INFO] [1473784916.396609254]: Configuring Sensor

[ INFO] [1473784916.478169101]: Configuring Safety

[ERROR] [1473784916.535399176]: Failed to SetMaxAcceleration

[ERROR] [1473784916.535474695]: Could not configure motor: my_joint_actuator

[FATAL] [1473784916.535516948]: Failed to initialize motors