Navigation demo assuming perfect ground truth pose from motion capture system. Uses mocap localization feedback to drive Jackal robot along figure 8 path. Segmented cross-track error (CTE) error is used for PD control.
Required:
- ROS (need full desktop installation to test in Gazebo)
- vrpn_client_ros
Optional:
On real jackal (assuming you are using a Jackal with laserscanner and it is running default bringup scripts and you have a motion capture system running a VRPN)
-
Add a tracker named "robot" to your motion capture VRPN
-
Launch motion capture client
roslaunch mocap_nav_demo vrpn_client.launch server:=<ip address of machine running motion capture server>
- Launch laserscanner node (I am using Hokuyo urg-04lx. NOTE: this step can be skipped and the demo will still run, but make sure the robot has room to navigate and won't collide with anything)
roslaunch mocap_nav_demo hokuyo.launch
- Launch mocap navigation demo for Jackal robot
roslaunch mocap_nav_demo jackal.launch
On simulated jackal
- Launch Jackal gazebo simulation with front laser (move robot to area where it has space to navigate)
roslaunch jackal_gazebo jackal_world.launch config:=front_laser
- Launch mocap navigation demo for simulated Jackal
roslaunch mocap_nav_demo jackal_gazebo.launch
1. S = segmented figure 8 shape
2. i=0 is current segment index
3. While True:
a. Get robot pose from motion capture
a. CTE = distance to current segment S_i
b. ang_vel = PD_control(CTE)
c. Publish twist command
d. If current segment is done -> i+=1