-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CANDLE] Did not receive response from CANdle! [FAILED] #11
Comments
Thank you for the submission. Could you share the code fragment that is performed after the begin() function? It will be useful in solving this. This message might be displayed because of the fact that candle is operating in update mode which ignores all the config commands and allows only operations that are performed on To know for certain what is happening I would need to look at the code that is performed when the error comes up. |
thanks @PawelKorsak for the reply. all config happens before .begin() is called. after that there's a ROS subscriber that sets the position targets and a ROS timer that controls the motor via note, I can only reproduce the issue when the host machine (Jetson Orin) hardware is power cycled. when doing a soft reboot (e.g. self.candle = pyCandle.Candle(pyCandle.CAN_BAUD_1M, True)
ids = self.candle.ping()
if len(ids) == 0: # If no drives found -> quit
sys.exit("EXIT FAILURE")
for m in self.motor_ids:
if m not in ids:
self.get_logger().error(f"Motor {m} is not on the CANdle bus")
for id in self.motor_ids:
self.candle.addMd80(id)
for id in self.motor_ids:
self.candle.writeMd80Register(id, pyCandle.Md80Reg_E.maxAcceleration, 30.0)
self.candle.writeMd80Register(id, pyCandle.Md80Reg_E.maxDeceleration, 30.0)
self.candle.writeMd80Register(id, pyCandle.Md80Reg_E.maxVelocity, 10.0)
self.candle.writeMd80Register(id, pyCandle.Md80Reg_E.maxTorque, 20.0)
self.candle.writeMd80Register(id, pyCandle.Md80Reg_E.positionWindow, 0.01)
self.candle.writeMd80Register(id, pyCandle.Md80Reg_E.velocityWindow, 0.01)
self.candle.writeMd80Register(id, pyCandle.Md80Reg_E.profileAcceleration, 20.0)
self.candle.writeMd80Register(id, pyCandle.Md80Reg_E.profileDeceleration, 20.0)
self.candle.writeMd80Register(id, pyCandle.Md80Reg_E.profileVelocity, 20.0)
self.candle.writeMd80Register(id, pyCandle.Md80Reg_E.quickStopDeceleration, 200.0)
self.candle.writeMd80Register(id, pyCandle.Md80Reg_E.motorPosPidKp, 10.0)
self.candle.controlMd80SetEncoderZero(id)
self.candle.controlMd80Mode(id, pyCandle.POSITION_PID)
for md in self.candle.md80s:
md.setTargetPosition(0)
self.candle.controlMd80Enable(id, True)
self.candle.begin()
self.get_logger().info("Started candle")
self.timer = self.create_timer(1.0 / UPDATE_RATE, self.update_targets)
self.subscription = self.create_subscription( # just a ROS2 subscriber that sets target positions for both motors
JointState,
'/mab/target/joint_state',
self.joint_state_callback,
1
)
def update_targets(self):
for motor_idx, desired_target in self.desired_targets.items():
<...>
self.candle.md80s[motor_idx].setTargetPosition(self.current_targets[motor_idx]) and the resulting log:
|
When powering on the Jetson Orin and auto starting a script using pyCANdle, an error is reported:
Did not receive response from CANdle! [FAILED]
. When this happens, the drives do not respond to position commands.Logs:
I'm using the following code to detect if there are any errors with the drives, but motors don't seem to report any errors when
Did not receive response from CANdle! [FAILED]
happensThe text was updated successfully, but these errors were encountered: