Help to change motor

Hi, i bought two leorover and work properly.
One it use with geoslam to perform autonomous navigation into cave.
Now i want to make a tiny leorover with pololu 20D with 62.5 gearbox and 20 CPR encoder, but i don’t find where change this? Into leocore?
Can you help me?
Best regards ;).

Actually in Leo Rover 1.5 we used Pololu motors and maybe there’s an option to tweak some parameter to revert back to different CPR. @Blazej_Sowa ?

I think i need to change some parameter leocore_firmware/parameters.hpp at master · LeoRover/leocore_firmware · GitHub

#pragma once

#include <ros.h>

#include <diff_drive_controller.hpp>

struct Parameters : DiffDriveParams {
// Override inherited parameters
Parameters() {
// Motor
wheel_encoder_resolution = 878.4F; 1250?
wheel_torque_constant = 1.17647F;
wheel_pid_p = 0.0F;
wheel_pid_i = 0.005F;
wheel_pid_d = 0.0F;
wheel_pwm_duty_limit = 100.0F;

// Differential drive
dd_wheel_radius = 0.0625F;
dd_wheel_separation = 0.33F;
dd_angular_velocity_multiplier = 1.91F;
dd_input_timeout = 500;


float battery_min_voltage = 10.0;

void load(ros::NodeHandle &nh);

If you have LeoOS 1.0.0, you can override the parameter values in /etc/ros/params.yaml file. The parameters are described here:

After modifying the file, load the parameter values to the parameter server:

rosparam load /etc/ros/params.yaml

and reset the firmware so it loads the new parameters:

rosservice call /firmware/reset_board
1 Like

Ok thanks, i will test.

I have this error:

pi@leo:/$ rosparam load /etc/ros/params.yaml
Traceback (most recent call last):
File “/opt/ros/noetic/bin/rosparam”, line 35, in
File “/opt/ros/noetic/lib/python3/dist-packages/rosparam/”, line 622, in yamlmain
_rosparam_cmd_set_load(command, argv)
File “/opt/ros/noetic/lib/python3/dist-packages/rosparam/”, line 543, in _rosparam_cmd_set_load
upload_params(ns, params, verbose=options.verbose)
File “/opt/ros/noetic/lib/python3/dist-packages/rosparam/”, line 383, in upload_params
set_param_raw(ns, values)
File “/opt/ros/noetic/lib/python3/dist-packages/rosparam/”, line 344, in set_param_raw
set_param_raw(ns_join(param, k), v, verbose=verbose)
File “/opt/ros/noetic/lib/python3/dist-packages/rosparam/”, line 344, in set_param_raw
set_param_raw(ns_join(param, k), v, verbose=verbose)
File “/opt/ros/noetic/lib/python3/dist-packages/rosparam/”, line 358, in set_param_raw
get_param_server().setParam(param, value)
File “/opt/ros/noetic/lib/python3/dist-packages/rosgraph/”, line 190, in setParam
return self._succeed(self.handle.setParam(self.caller_id, key, value))
File “/usr/lib/python3.8/xmlrpc/”, line 1109, in call
return self.__send(self.__name, args)
File “/usr/lib/python3.8/xmlrpc/”, line 1447, in __request
request = dumps(params, methodname, encoding=self.__encoding,
File “/usr/lib/python3.8/xmlrpc/”, line 968, in dumps
data = m.dumps(params)
File “/usr/lib/python3.8/xmlrpc/”, line 501, in dumps
dump(v, write)
File “/usr/lib/python3.8/xmlrpc/”, line 523, in __dump
f(self, value, write)
File “/usr/lib/python3.8/xmlrpc/”, line 527, in dump_nil
raise TypeError(“cannot marshal None unless allow_none is enabled”)
TypeError: cannot marshal None unless allow_none is enabled

Ok just comment all parameter didn’t need to change.