Canopen_motor_node, Error document empty
Hi,
I'm trying to use the motion controller FAULHABER MCBL 3006 S AES with ros_canopen . It seems there is no tutorial on how to use ros_canopen, the closest i've found is : https://answers.ros.org/question/2501...
I use a raspberry pi 3 with a PICAN hat. The hat works fine : with candump
and cansend
I can communicate, send PDO request or commands.
I've followed the instructions of the answer above, so here are my configuration files :
urdf
<robot name="test_robot">
<link name="link1" />
<link name="link2" />
<joint name="node1" type="continuous">
<parent link="link1"/>
<child link="link2"/>
<origin xyz="1 0 0" rpy="0 0 0" />
<axis xyz="1 0 0" />
<limit effort="30" velocity="1.0" lower="-2.2" upper="2.7" />
</joint>
</robot>
The urdf file is fine when checked with check_urdf
.
yaml config
bus:
device: can0 # socketcan network
# loopback: false # socket should loop back messages
# driver_plugin: can::SocketCANInterface
# master_allocator: canopen::SimpleMaster::Allocator
sync:
interval_ms: 10 # set to 0 to disable sync
# update_ms: <interval_ms> #update interval of control loop, must be set explecitly if sync is disabled
overflow: 0 # overflow sync counter at value or do not set it (0, default)
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: can_test # optionals package name for relative path
eds_file: "config/605.3150.70-A-EK-2-60.eds" # path to EDS/DCF file
defaults: # optional, all defaults can be overwritten per node
# 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: 5 # (Operation_Enable), state for mode switching
pos_to_device: "rint(rad2deg(pos)*1000)" # rad -> mdeg
pos_from_device: "deg2rad(obj6064)/1000" # actual position [mdeg] -> rad
vel_to_device: "rint(rad2deg(vel)*1000)" # rad/s -> mdeg/s
vel_from_device: "deg2rad(obj606C)/1000" # actual velocity [mdeg/s] -> rad/s
eff_to_device: "rint(eff)" # just round to integer
eff_from_device: "0" # unset
launchfile
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<param name="robot_description" value="$(find can_test)/config/robot_description.urdf"/>
<node name="motor" pkg="canopen_motor_node" type="canopen_motor_node">
<rosparam command="load" file="$(find can_test)/config/can_config.yaml" />
</node>
</launch>
There is no controller for now. I'm not sure this isn't required to use canopen_motor_node
, I would appreciate if someone could clarify that.
But when I run roslaunch can_test test.launch
I get :
SUMMARY
========
PARAMETERS
* /motor/bus/device: can0
* /motor/defaults/eff_from_device: 0
* /motor/defaults/eff_to_device: rint(eff)
* /motor/defaults/motor_allocator: canopen::Motor402...
* /motor/defaults/motor_layer/switching_state: 5
* /motor/defaults/pos_from_device: deg2rad(obj6064)/...
* /motor/defaults/pos_to_device: rint(rad2deg(pos)...
* /motor/defaults/vel_from_device: deg2rad(obj606C)/...
* /motor/defaults/vel_to_device: rint(rad2deg(vel)...
* /motor/heartbeat/msg: 77f#05
* /motor/heartbeat/rate: 20
* /motor/nodes/node1/eds_file: config/605.3150.7...
* /motor/nodes/node1/eds_pkg: can_test
* /motor/nodes/node1/id: 1
* /motor/sync/interval_ms: 10
* /motor/sync/overflow: 0
* /robot_description: /home/body/Worksp...
* /rosdistro: kinetic
* /rosversion: 1.12.12
NODES
/
motor (canopen_motor_node/canopen_motor_node)
auto-starting new master
process[master]: started with pid [2259 ...