ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Cannot load message class for [roboclaw/RoboclawEncoderSteps]

asked 2020-03-02 15:33:07 -0500

hellraiser gravatar image

updated 2020-03-02 16:14:43 -0500

gvdhoorn gravatar image

Hello,

I'm trying to get joy teleop working with a Roboclaw motor controller.

I'm using this node to interface with the controller.

https://github.com/csvance/roboclaw

Current setup:

ROS Melodic Jetson Nano Roboclaw 2x15 Motor controller

While troubleshooting I'm unable to rostopic echo /motor_enc. I'm getting the following error.

rostopic echo /motor_enc
ERROR: Cannot load message class for [roboclaw/RoboclawEncoderSteps]. Are your messages built?

catkin_make compiled the project successfully with no errors.

I'm using AMT10 quadrature encoders and I'm able to see the counters increase or decrease with BasicMicroMotionStudio software. I've tried lowing the encoders PPS settings to the lowest available resolution. Current resolution settings are at 48 pulses a second which gives me around 482 steps per meter.

Has anyone encountered this issue before? I'm a beginner with ROS and I'm not sure where to start looking. I would really appreciate anyone's assistance with this issue.

This is the launch file i'm using.

<!--
    Roboclaw 0x80 Index: 0
-->
<node pkg="roboclaw" type="roboclaw_node" name="roboclaw" output="screen">
    <param name="~serial_port" value="/dev/ttyACM0"/>
    <param name="~baudrate" value="115200"/>
    <param name="~roboclaws" value="1"/>
</node>


<node pkg="roboclaw" type="diffdrive_node" name="diffdrive" output="screen">
    <param name="~roboclaws" value="1"/>
    <param name="~steps_per_meter" value="482.88"/>
    <param name="~base_width" value="0.31"/>      
<param name="~swap_motors" value="false"/>
    <param name="~invert_motor_1" value="false"/>
    <param name="~invert_motor_2" value="false"/>
    <param name="~var_pos_x" value="0.01"/>
    <param name="~var_pos_y" value="0.01"/>
    <param name="~var_theta_z" value="0.01"/>
<node pkg="teleop_twist_joy" type="teleop_node" name="joystick_to_twist">   

</node>

video of issue:

https://youtu.be/B7CpNJxM1HM

Terminal Output - I can't attach txt documents

ROSTOPICS

/cmd_vel
/diagnostics
/joy
/joy/set_feedback
/motor_cmd_vel
/motor_enc
/odom
/rosout
/rosout_agg
/tf

ivan@WiRover:~/Downloads/maestro-linux$ echo /motor_cmd_vel
/motor_cmd_vel
ivan@WiRover:~/Downloads/maestro-linux$ rostopic echo /motor_cmd_vel
ERROR: Cannot load message class for [roboclaw/RoboclawMotorVelocity]. Are your messages built?
ivan@WiRover:~/Downloads/maestro-linux$ rostopic echo /motor_cmd_vel
ERROR: Cannot load message class for [roboclaw/RoboclawMotorVelocity]. Are your messages built?
ivan@WiRover:~/Downloads/maestro-linux$ rostopic echo /motor_enc
ERROR: Cannot load message class for [roboclaw/RoboclawEncoderSteps]. Are your messages built?

/cmd_vel OUTPUT

---
linear: 
  x: 0.00429909443483
  y: 0.0
  z: 0.0
angular: 
  x: 0.0
  y: 0.0
  z: 0.0
---
linear: 
  x: 0.155911833048
  y: 0.0
  z: 0.0
angular: 
  x: 0.0
  y: 0.0
  z: 0.0
---
linear: 
  x: 0.159702554345
  y: 0.0
  z: 0.0
angular: 
  x: 0.0
  y: 0.0
  z: 0.0
---
linear: 
  x: 0.177258729935
  y: 0.0
  z: 0.0
angular: 
  x: 0.0
  y: 0.0
  z: 0.0
---
linear: 
  x: 0.199649676681
  y: 0.0
  z: 0.0
angular: 
  x: 0.0
  y: 0.0
  z: 0.0
---
linear: 
  x: 0.225381597877
  y: 0.0
  z: 0.0
angular: 
  x: 0.0
  y: 0.0
  z: 0.0
---
linear: 
  x: 0.25251096487
  y ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-03-05 21:53:12 -0500

hellraiser gravatar image

Found problem to issue.

Increased encoder resolution to 2048 pulses per second. re-tuned for position and velocity with BasicMicroMotionStudio. Changed "steps_per_meter" parameter to account for new PPS settings.

Original error message was solved by sourcing devel/setup.bash.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-03-02 15:33:07 -0500

Seen: 291 times

Last updated: Mar 05 '20