Skip to content
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

CANopen connection #24

Open
grafoteka opened this issue May 16, 2018 · 1 comment
Open

CANopen connection #24

grafoteka opened this issue May 16, 2018 · 1 comment

Comments

@grafoteka
Copy link

Hello,
I am trying to connect now my EPOS with an IXXAT CAN-to-USB adapter.
http://www.er-soft.com/fabricantes/ixxat/pasarelas-de-comunicacion-industrial/usb-to-can-fd-compact

I can control the motor with the HelloEposCmd.cpp example from Maxon.

I have modify @JimmyDaSilva branch to the CANopen settings:

else{
    if(comm_protocol_ == "CANopen"){
      node_handle_ = epos_factory_->CreateNodeHandle("EPOS", "CANopen", "CAN_ixx_usb 0", serial_number_, &error_code);
      if(!node_handle_) {
        ROS_ERROR("Could not find motor with CANopen");
        return false;
      }
      ROS_INFO_STREAM("Found Motor");
      if(!VCS_SetProtocolStackSettings(node_handle_->device_handle->ptr, 1000000, 500, &error_code)) {
        ROS_ERROR("Failed to SetProtocolStackSettings");
        return false;
      }
    }

But I still having the errors:

[ERROR] [1526481093.586453326]: Could not find motor with CANopen
[ERROR] [1526481093.586487038]: Could not configure motor: my_joint_actuator
[FATAL] [1526481093.586505848]: Failed to initialize motors

As I told before, the CANopen adpater is working, but I don't know if the problem is that is connected as a Ethernet adapter.

jorge@jorge-ubuntu:~$ ifconfig 
can0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          UP RUNNING NOARP  MTU:16  Metric:1
          RX packets:293 errors:0 dropped:0 overruns:0 frame:0
          TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10 
          RX bytes:678 (678.0 B)  TX bytes:432 (432.0 B)

Also, for all the connection I have to specify the next parameters:

device name (EPOS)
protocol stack name (CANopen)
interface name (CAN_ixx_usb 0)
port name (CAN0)
baudrate (1000000)

@mitchellwills Could we try to improve the branch from @JimmyDaSilva and add the option for CANopen connection?

Kinds regards,
Jorge

@grafoteka
Copy link
Author

no one can help me?

is not possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant