Avocat en droit de la construction
5 days ago
ROS Hydro Medusa has been release and we are close behind with an alpha release of the TurtleBot Hydro ISO Installer and we are hoping for a beta early next week.
http://data.iheartengineering.com/turtlebot-hydro-ubuntu-12.04.2-alpha1.iso
UPDATE: Problem with DNS propagation
adding this to your /etc/hosts should work for now
66.228.47.240 data.iheartengineering.com
Scan_msg
. At it's initialization, a Scan_msg object creates a publisher, pub
, for twist messages, variable msg
to hold the twist message, variables sect_1
, sect_2
, and sect_3
, and 3 dictionaries - ang
, fwd
, and dbgmsg
- to hold the angular speed, linear speed, and debug message for each possible instance, respectively.sect_1
, sect_2
, and sect_3
each represent a specific part of the field of view of the turtlebot (see image below). sort()
and movement()
. sort()
takes in a laserscan message and goes through all the ranges read by the robot. If any of the ranges is less than 0.6 m (an obstacle is detected), it determines which section of the field of view (sect_1
, sect_2
, or sect_3
) the obstacle is located in and changes the value of that section to 1. movement()
takes in the values of sect_1
, sect_2
, and sect_3
and uses them to determine how to move. To do this, it creates a number with the values of these 3 variables and assigns that number to the variable sect
. sect
is then used with the class dictionaries to change the angular and linear velocities of msg to the proper values and display the correct debug message. Finally, movement()
published this modified twist message (see code below).Finally, thesect = int(str(self.sect_1) + str(self.sect_2) + str(self.sect_3)) self.msg.angular.z = self.ang[sect] self.msg.linear.x = self.fwd[sect] rospy.loginfo(self.dbgmsg[sect]) self.pub.publish(self.msg)
reset_sect()
function is run to reset the values of sect_1
, sect_2
, and sect_3
to 0. for_callback()
takes in a laserscan message and runs both of the above functions. listener()
function first initializes the node navigation_sensors
, and then creates a subscriber with callback function call_back()
. call_back()
takes a Scan_msg object and passes the laserscan message to the class function for_callback()
. sub_obj
is created. listener()
is then run, starting the subscriber, which passes a laserscan message to the call_back()
function. call_back()
passes the laserscan message to sub_obj
's for_callback()
function. for_callback()
first runs sort()
, which updates variables sect_1
, sect_2
, and sect_3
accordingly, then passes these updated variables to movement()
which uses them to determine where to go, updates the class twist message, and publishes that message. This process repeats for each laserscan message. All source code available at:Wanderer appears on the far right along with the other apps in App Chooser