sonyccd / roboclaw_ros

ros for roboclaw
BSD 2-Clause "Simplified" License
50 stars 92 forks source link

unable to check for odometry and telemetry data #3

Closed harryman1 closed 8 years ago

harryman1 commented 8 years ago

I'm unable to see the /odom data when using the node, also it is not possible to see other status conditions from the controller (i.e battery status and Voltage, temperature) and to set up an E-stop signal

sonyccd commented 8 years ago

Yes this will all be apart of the C++ driver as soon as my classes slow down a bit lol.

As for as the /odom you should be seeing that. Could you send me any configuration data you have such as your launch file and the topics.

harryman1 commented 8 years ago

Hi

for now I’m just testing the node you wrote and when I use rostopic echo /odom no data is displayed,

I'm just starting to learn ROS :( sorry

good luck with you classes

Henry

Date: Tue, 12 Apr 2016 06:02:27 -0700 From: notifications@github.com To: roboclaw_ros@noreply.github.com CC: henryacev@hotmail.com Subject: Re: [sonyccd/roboclaw_ros] unable to check for odometry and telemetry data (#3)

Yes this will all be apart of the C++ driver as soon as my classes slow down a bit lol.

As for as the /odom you should be seeing that. Could you send me any configuration data you have such as your launch file and the topics.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

sonyccd commented 8 years ago

Well welcome to ROS and the community. It can be a bit daunting at first but you will catch on quick.

Here are a few things that might help you in the future.

As for your problem. You need to figure out if any data is being read by the encoders. Run the ION MC software and see that the encoders are working and recording a change in position. If that is working then place rospy.loginfo statements in the code to print out the raw values of the encoders. If that does not just keep placing the rospy.loginfo statements until you see where things are not working. Now you know where things stop working. At this point let me know what you find, this could be a bug I don't know about.

FYI you will be changing this file. https://github.com/sonyccd/roboclaw_ros/blob/master/roboclaw_node/nodes/roboclaw_node.py

harryman1 commented 8 years ago

HI

me first timer with python and after not developing for more than 15 years, took me long time trying to get this .

anyway :), so I had add rospy.loginfo and rospy.logdebug, across all functions and classes definitions funtions, then I ran rqt_console, and I couldn’t see any indication of those being used.

the only part I can see are vr_ticks:%d vl_ticks: %d on line 274, and I got the impression that the function publish_odom is not used,

I also introduced an error in the class definition function def update and at running time this was not block the program

I'm not sure if this make sense :)

Thanks

Date: Wed, 13 Apr 2016 07:11:16 -0700 From: notifications@github.com To: roboclaw_ros@noreply.github.com CC: henryacev@hotmail.com Subject: Re: [sonyccd/roboclaw_ros] unable to check for odometry and telemetry data (#3)

Well welcome to ROS and the community. It can be a bit daunting at first but you will catch on quick.

Here are a few things that might help you in the future.

This is a cheat sheet that is good to have, make sure and download the catkin version https://github.com/ros/cheatsheet/releases/tag/0.0.1

I really liked this book.

http://www.amazon.com/Learning-ROS-Robotics-Programming-Second/dp/1783987588/ref=sr_1_2?ie=UTF8&qid=1460556363&sr=8-2&keywords=ros

And of course the tutorials.

http://wiki.ros.org/ROS/Tutorials

As for your problem. You need to figure out if any data is being read by the encoders. Run the ION MC software and see that the encoders are working and recording a change in position. If that is working then place rospy.loginfo statements in the code to print out the raw values of the encoders. If that does not just keep placing the rospy.loginfo statements until you see where things are not working. Now you know where things stop working. At this point let me know what you find, this could be a bug I don't know about.

FYI you will be changing this file.

https://github.com/sonyccd/roboclaw_ros/blob/master/roboclaw_node/nodes/roboclaw_node.py

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

sonyccd commented 8 years ago

All functions are used.

Add output="screen" to line 12 before the > in file https://github.com/sonyccd/roboclaw_ros/blob/master/roboclaw_node/launch/roboclaw.launch

That will print all the messages to the screen for you to see.

harryman1 commented 8 years ago

yes, I can see the output messages, like this one

[INFO] [WallTime: 1460728452.287377] Did not get comand for 1 second, stopping [DEBUG] [WallTime: 1460728452.325781] connecting to Pluto 58818 [INFO] [WallTime: 1460728452.387452] Did not get comand for 1 second, stopping [DEBUG] [WallTime: 1460728452.390012] vr_ticks:2171 vl_ticks: 2171

I had add the log_level=rospy.DEBUG on line 156 rospy.init_node("roboclaw_node", log_level=rospy.DEBUG)

add load of rospy.loginfo("message",data to log) (i.e rospy.loginfo("Encoder left ticks",left_ticks))

but still no see where things break, I starting to debug line by line, so I'm in the quest :)

Thanks Date: Thu, 14 Apr 2016 13:29:10 -0700 From: notifications@github.com To: roboclaw_ros@noreply.github.com CC: henryacev@hotmail.com Subject: Re: [sonyccd/roboclaw_ros] unable to check for odometry and telemetry data (#3)

All functions are used.

Add output="screen" to line 12 before the > in file

https://github.com/sonyccd/roboclaw_ros/blob/master/roboclaw_node/launch/roboclaw.launch

That will print all the messages to the screen for you to see.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

sonyccd commented 8 years ago

Ok let me know if you find where it is stoping. I broke my roboclaw and won't have the new one for a week. When I get it I will see if I can find where this problem is coming from.

harryman1 commented 8 years ago

I got some debugging done on the def cmd_vel_callback(self, twist) can't get logs messages

Date: Wed, 20 Apr 2016 05:24:45 -0700 From: notifications@github.com To: roboclaw_ros@noreply.github.com CC: henryacev@hotmail.com; author@noreply.github.com Subject: Re: [sonyccd/roboclaw_ros] unable to check for odometry and telemetry data (#3)

Ok let me know if you find where it is stoping. I broke my roboclaw and won't have the new one for a week. When I get it I will see if I can find where this problem is coming from.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

sonyccd commented 8 years ago

Like you see no messages from ros log at all?

harryman1 commented 8 years ago

that is correct, no ros logs

Date: Fri, 29 Apr 2016 05:40:16 -0700 From: notifications@github.com To: roboclaw_ros@noreply.github.com CC: henryacev@hotmail.com; author@noreply.github.com Subject: Re: [sonyccd/roboclaw_ros] unable to check for odometry and telemetry data (#3)

Like you see no messages from ros log at all?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

sonyccd commented 8 years ago

Please send me your ros launch file.

harryman1 commented 8 years ago

Date: Fri, 29 Apr 2016 06:21:31 -0700 From: notifications@github.com To: roboclaw_ros@noreply.github.com CC: henryacev@hotmail.com; author@noreply.github.com Subject: Re: [sonyccd/roboclaw_ros] unable to check for odometry and telemetry data (#3)

Please send me your ros launch file.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

sonyccd commented 8 years ago

I mean paste it in the response lol

harryman1 commented 8 years ago

oops

sorry

I'm using the launch file you created

Date: Fri, 29 Apr 2016 06:26:22 -0700 From: notifications@github.com To: roboclaw_ros@noreply.github.com CC: henryacev@hotmail.com; author@noreply.github.com Subject: Re: [sonyccd/roboclaw_ros] unable to check for odometry and telemetry data (#3)

I mean paste it in the response lol

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

sonyccd commented 8 years ago

Ok can you figure out that point when the logs stopped, everything here looks fine.

harryman1 commented 8 years ago

can we do a skype session, i think will be more efficient :)

sonyccd commented 8 years ago

Can I finish exams first lol

harryman1 commented 8 years ago

sure, good luck on your exams :)

Date: Mon, 2 May 2016 07:09:03 -0700 From: notifications@github.com To: roboclaw_ros@noreply.github.com CC: henryacev@hotmail.com; author@noreply.github.com Subject: Re: [sonyccd/roboclaw_ros] unable to check for odometry and telemetry data (#3)

Can I finish exams first lol

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

icemanx commented 8 years ago

There is a typo in roboclaw_node.py line 180: self.TICKS_PER_METER = float(rospy.get_param("~tick_per_meter", "4342.2"))

"tick_per_meter" must be "ticks_per_meter"

and I realized that code is not reaching to line 232. I cannot get odom messages. So I changed the line 231 to this: if (enc1 != None) & (enc2 != None):

I'm not an python expert but I couldn't understand what this line is supposed to do? if (enc1 in locals()) & (enc2 in locals()):

Hope this helps, it works for me.

sonyccd commented 8 years ago

Ok I am back in the loop of things. Thanks for catching that I will fix that now. ! If that fixes the problem please close the issue or lets keep talking.

harryman1 commented 8 years ago

Hi,

I can confirm that the changes on line 232 solves the issue

I got odometry data now :) Thank you

sonyccd commented 8 years ago

Will push changes tonightish

doisyg commented 8 years ago

Were these change pushed? I have the same issues...