How can i get the robot to move after clicking 2d nav goal on rviz?
Hey guys, i'm trying to implement the ros navigation stack. I am using a Jetson nano Dev kit and a waveshare's Jetracer Ai Kit as my robot(it has 4 wheels without encoders). i am using ros melodic and ubuntu 18.04.
I have been able to successfully set up the robot follow these instructions (https://tutorial.cytron.io/2021/04/16...)
using ros package RPLiDAR_S1 and hector slam i was able to create 2D map of an environment.
Now i am trying to implement the ros navigation stack following these instructions https://automaticaddison.com/how-to-s...
i modified the launch file to suit the nodes i have running. I also included save my hector slam map into the launch file.
these are the are the topics being published after launching the file.
user@user-jetracer:~$ rostopic list
/amcl/parameter_descriptions
/amcl/parameter_updates
/amcl_pose
/clicked_point
/cmd_vel
/diagnostics
/goal_2d
/imu/data
/imu/data_raw
/initial_2d
/initialpose
/map
/map_metadata
/move_base/NavfnROS/plan
/move_base/TrajectoryPlannerROS/cost_cloud
/move_base/TrajectoryPlannerROS/global_plan
/move_base/TrajectoryPlannerROS/local_plan
/move_base/TrajectoryPlannerROS/parameter_descriptions
/move_base/TrajectoryPlannerROS/parameter_updates
/move_base/cancel
/move_base/current_goal
/move_base/feedback
/move_base/global_costmap/costmap
/move_base/global_costmap/costmap_updates
/move_base/global_costmap/footprint
/move_base/global_costmap/inflation_layer/parameter_descriptions
/move_base/global_costmap/inflation_layer/parameter_updates
/move_base/global_costmap/obstacle_layer/parameter_descriptions
/move_base/global_costmap/obstacle_layer/parameter_updates
/move_base/global_costmap/parameter_descriptions
/move_base/global_costmap/parameter_updates
/move_base/global_costmap/static_layer/parameter_descriptions
/move_base/global_costmap/static_layer/parameter_updates
/move_base/goal
/move_base/local_costmap/costmap
/move_base/local_costmap/costmap_updates
/move_base/local_costmap/footprint
/move_base/local_costmap/inflation_layer/parameter_descriptions
/move_base/local_costmap/inflation_layer/parameter_updates
/move_base/local_costmap/obstacle_layer/parameter_descriptions
/move_base/local_costmap/obstacle_layer/parameter_updates
/move_base/local_costmap/parameter_descriptions
/move_base/local_costmap/parameter_updates
/move_base/local_costmap/static_layer/parameter_descriptions
/move_base/local_costmap/static_layer/parameter_updates
/move_base/parameter_descriptions
/move_base/parameter_updates
/move_base/recovery_status
/move_base/result
/move_base/status
/move_base_simple/goal
/odom_data_quat
/particlecloud
/robot_pose_ekf/odom_combined
/rosout
/rosout_agg
/scan
/temperature
/tf
/tf_static
on the python code for my robot i try to subcribe to the topic /cmd_vel which i understand is responsible for getting the mobile base to move in a linear and angular direction.
bottom line is on Rviz when i click 2d Nav Goal on the map, my robot doesn;t move. rather i am getting this error.
[INFO] [1663328447.037749]: Throttle: 0.0
[INFO] [1663328447.042918]: Steering: 0.0
[INFO] [1663328447.141553]: Throttle: 0.0
[INFO] [1663328447.144452]: Steering: 0.0
[INFO] [1663328447.191959]: /cmd_vel: x: -0.1
y: 0.0
z: 0.0
[ERROR] [1663328447.221475]: bad callback: <function callback_cmd at 0x7fa28af7b8>
Traceback (most recent call last):
File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback
cb(msg)
File "/home/user/catkin_ws/src/cytron_jetracer/scripts/racecar.py", line 32, in callback_cmd
car.throttle = cmd.linear
File "/usr/local/lib/python3.6/dist-packages/traitlets/traitlets.py", line 585, in __set__
self.set(obj, value)
File "/usr/local/lib/python3.6/dist-packages/traitlets/traitlets.py", line 559, in set
new_value = self._validate(obj, value)
File "/usr/local/lib/python3.6/dist-packages/traitlets/traitlets.py", line 591, in _validate
value = self.validate(obj, value)
File "/usr/local/lib/python3.6/dist-packages/traitlets/traitlets.py", line 1976, in validate
self.error(obj, value)
File "/usr ...