-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to initialize driver: Supported drive modes (object 6502) is not valid #462
Comments
@mathias-luedtke any hints? |
i have the ZLAC8015 and its missing that object (6502h) i ve managed to inicialize it on canopen_chain |
hey PHONG, ive used this launch file, it inits the driver when i use launch filelaunch>
<!-- Load URDF into ROS parameter server -->
<param name="robot_description" textfile="$(find second_ROS_assembly)/urdf/second_ROS_assembly.urdf" />
<arg name="yaml"/>
<node name="canopen_chain" pkg="canopen_chain_node" type="canopen_chain_node" output="screen"
clear_params="true">
<rosparam command="load" file="$(find canopen_chain_node)/launch/my_yml_eds.yaml" />
<rosparam command="load" file="$(find canopen_chain_node)/config/node.yaml" />
</node>
<!-- Load Joint Controller configuration from YAML file to parameter server -->
<rosparam file="$(find berry_bot_bringup)/config/berry_bot_controllers.yaml" command="load"/>
<!-- load the controllers-->
<node name="controller_spawner" pkg="controller_manager" type="controller_manager" respawn="false"
output="screen"
args="spawn
joint_state_controller
rueda1_velocity_controller
rueda2_velocity_controller
rueda3_velocity_controller
rueda4_velocity_controller
"/>
<!--combine joint values-->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"/>
<!--Show in Rviz-->
<node name="rviz" pkg="rviz" type="rviz"/>
</launch> the files i load to can_open_chain are
my_yml_eds.yaml---
bus:
device: can0 # socketcan network
# loopback: false # socket should loop back messages
driver_plugin: can::SocketCANInterface
master_allocator: canopen::SimpleMaster::Allocator
sync:
interval_ms: 20 # set to 0 to disable sync
#overflow: # overflow sync counter at value or do not set it (0, default)
update_ms: 20 #update interval of control loop, must be set explecitly if sync is disabled
#heartbeat: # simple heartbeat producer, optional!
#rate: 20 # heartbeat rate
#msg: "77f#05" # message to send, cansend format: heartbeat of node 127 with status 5=Started
# struct syntax
nodes:
node1:
id: 1
#eds_pkg: my_config_package # optionals package name for relative path
eds_file: "/path/to/canopen_chain_node/launch/ZLAC8015D_V1.0.eds" # path to EDS/DCF file
switching_state: 3 # (Operation_Enable), state for mode switching. Drive mode of operation from canopen_402 wiki node.yamlthis makes changes the name of the node to "wheel_back_left_joint" keep this in mind rosservice call /driver/set_object "node: 'wheel_back_left_joint'
object: '6040'
value: '0'
cached: false"
success: True
message: '' nodes:
node1:
id: 1
name: wheel_back_left_joint
#eds_pkg: # optionals package name for relative path
eds_file: "/path/to/file/canopen_chain_node/launch/ZLAC8015D_V1.0.eds" # path to EDS/DCF file
defaults: # optional, all defaults can be overwritten per node
# eds_pkg: my_config_package # optional package name for relative path
# eds_file: "my_config.dcf" # path to EDS/DCF file
# dcf_overlay: # "ObjectID": "ParameterValue" (both as strings)
# "6098": "0" # No homing operation required
# "1016sub1" : "0x7F0064" # heartbeat timeout of 100 ms for master at 127
# "1017": "100" # heartbeat producer
# canopen_chain_node settings ..
motor_allocator: canopen::Motor402::Allocator # select allocator for motor layer
# motor_layer: settings passed to motor layer (plugin-specific)
switching_state: 2 # (Operation_Enable), state for mode switching. Drive mode of operation from canopen_402 wiki
pos_to_device: "pos" # inc
pos_from_device: "obj6064" # inc
vel_to_device: "vel" # rpm
vel_from_device: "obj606C" # rpm
Like i said i'm having trouble with ROS so any help would be appreciated |
If 6502 isn't defined in the EDS you will have issues using the motor chain. The reason for this is that it queries 6502 to validate that the requested mode (eg: profile position, profile velocity) is supported. I ran into a similar issue, one of my drivers didn't implement 6502. You can get around this by adding 6502 to the EDS and using the DefaultValue field to add in the required mode. The reason you can do this is that the call to object 6502 in the code gets cached data, so if DefaultValue exists it will just pull that instead of calling the SDO. To modify your EDS/DCF you can do the following: For example, in my case I already had 55 objects, I added object 56=0x6502 on the end, and set Supported objects to 56. Then, you need to add the object itself with a DefaultValue that passes the Supported Drive Mode check. 3FF should be fine as it will catch all the possibilities. [6502] |
Thnx Oren, i was thinking there had to be a way, but now i know! ill give it a try and hopefully get this thing moving Cheers! |
The following repos I created might be useful. I was able to run ZLAC8030L with ROS Melodic (Python 2) |
thnx ill give it a look |
Hi!
I have a brushless motor driver that supports CANopen, and I would like to control it in profile velocity mode. The driver supports only 3 modes
1: Profile Position Mode
3: Profile Velocity Mode
4: Profile Torque Mode'
The modes can be set by OD
6060h
(Mode of operation), and can be read by6061h
(Mode of operation display). I have read so many docs and posts in order to understand how to use theros_canopen
package, and here are the steps I followed, which lead to the issues of not able to initialize the drivers.can0.yaml
driver.launch
When I launch the above launch file, and execute
rosservice call /driver/init
I get the following output from the motor node which matches the msg in the service response,NOTE: in the EDS file provided by the manufacturer, the OD
6502
is not defined, and I am not sure if this is an issue.@mathias-luedtke Any help in debugging this issue is highly appreciated.
The driver manual, and the EDS file are attached for reference.
zlac8030L.txt
ZLAC8030L CANopen COMMUNICATION Version 1.00-1.pdf
The text was updated successfully, but these errors were encountered: