astuff / kvaser_interface

A Kvaser CAN interface ROS abstraction layer.
MIT License
84 stars 52 forks source link

Error at canSetBusParams() #49

Closed Xahkarias closed 4 years ago

Xahkarias commented 4 years ago

Hello, I am receiving an error message similar to that of Issue #12 . Through usage of the ROS_WARN() command, I have verified that my hardware_id and circuit_id are correct, and initialization passes until it reaches
if (canSetBusParams(*handle, freq, 0, 0, 0, 0, 0) < 0) return ReturnStatuses::BAD_PARAM;
in kvaser_interface.cpp which returns BAD_PARAM and kills initialization

Using Ubuntu 16.04 LTS Running listChannels on from linuxcan confirms that I have the correct hardware id, and that my Kvaser device is recognized

I do not fully understand the documentation of canSetBusParams on Kvaser's website, and am looking for any available help.

JWhitleyWork commented 4 years ago

@Xahkarias - Can you please provide the full output of the following commands?

ls /usr/src | grep -E 'kvaser|linuxcan'
rosrun kvaser_interface list_channels
rosrun kvaser_interface canmonitor 0

(while running the driver)

rosparam get /kvaser_can_bridge/can_hardware_id

Also, please provide information on how you installed the Kvaser driver.

Xahkarias commented 4 years ago

My apologies, it turns out that the computer I was running on did not automatically run $ source devel/setup.sh upon opening the terminal.

The issue was resolved once I realized this.