You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@DaikiMaekawa Hello,Mr. DaikiMaekawa, after running the waypoints_nav program, do I still need to run move_base?
At the same time, I use the handle to control the robot to build the map, so how do I need to modify my handle program to match this package? Below is my handle program and launch file:
`
#!/usr/bin/python
#coding=utf-8
import time
import rospy
from sensor_msgs.msg import Joy
from geometry_msgs.msg import Twist
class Joy360:
def init(self):
self.__line_x = 0
self.__angle_z = 0
self.__pub_cmd_vel = None #:
self.__pub_can_vel = None
self.__start = False
rospy.init_node("joy")
rospy.Subscriber("joy",Joy,self.joy_callback)
#self.__pub_cmd_vel = rospy.Publisher("/cmd_vel",Twist,queue_size=100)
self.__pub_cmd_vel = rospy.Publisher("/joy/cmd_vel",Twist,queue_size=100)
def joy_callback(self,data):
if data.buttons[10] == 1:
self.__start = not self.__start
self.__line_x = data.axes[1]*0.3
self.__angle_z = data.axes[3]*0.3
def start(self):
rospy.loginfo("init node ok!!")
try:
while not rospy.is_shutdown():
#time.sleep(0.01)
cmd= Twist()
cmd.linear.x=self.__line_x
cmd.angular.z=self.__angle_z
if self.__start:
self.__pub_cmd_vel.publish(cmd)
except KeyboardInterrupt as e:
rospy.loginfo("quit by user " + str(e))
if name=="main":
joy_ins = Joy360()
joy_ins.start()`
The text was updated successfully, but these errors were encountered:
@DaikiMaekawa Hello,Mr. DaikiMaekawa, after running the waypoints_nav program, do I still need to run move_base?

At the same time, I use the handle to control the robot to build the map, so how do I need to modify my handle program to match this package? Below is my handle program and launch file:
`
#!/usr/bin/python
#coding=utf-8
import time
import rospy
from sensor_msgs.msg import Joy
from geometry_msgs.msg import Twist
class Joy360:
def init(self):
self.__line_x = 0
self.__angle_z = 0
self.__pub_cmd_vel = None #:
self.__pub_can_vel = None
self.__start = False
rospy.init_node("joy")
rospy.Subscriber("joy",Joy,self.joy_callback)
#self.__pub_cmd_vel = rospy.Publisher("/cmd_vel",Twist,queue_size=100)
self.__pub_cmd_vel = rospy.Publisher("/joy/cmd_vel",Twist,queue_size=100)
if name=="main":
joy_ins = Joy360()
joy_ins.start()`
The text was updated successfully, but these errors were encountered: