ROSLIB EXAMPLE
'turtlebot':{
serverName:'/move_base',
cmdName:'/cmd_vel_mux/input/teleop',
planName:'/move_base/NavfnROS/plan',
},'pr2':{
serverName:'/pr2_move_base',
cmdName:'/cmd_vel',
planName:'/move_base/NavfnROS/plan',
},
- ROS Melodic or Kinetic:
sudo apt-get install ros-kinetic-turtlebot-sim* ....
- Noetic
Build the source code.
Ref:
change the noetic to your local ROS version, like kinetic or melodic
export TURTLEBOT_STAGE_WORLD_FILE="/opt/ros/noetic/share/turtlebot_stage/maps/stage/maze.world"
export TURTLEBOT_STAGE_MAP_FILE="/opt/ros/noetic/share/turtlebot_stage/maps/maze.yaml"
roslaunch turtlebot_stage turtlebot_in_stage.launch
roslaunch rosbridge_server rosbridge_websocket.launch
rosrun robot_pose_publisher robot_pose_publisher
)](https://github.com/Camixxx/RosNavJs/blob/main/img/roslaunch1cmd.png?raw=true)
roslaunch pr2_tuckarm tuck_arms.launch
发布机器人的姿势:rosrun robot_pose_publisher robot_pose_publisher
启动rosbridge 服务器:roslaunch rosbridge_server rosbridge_websocket.launch
open public/example/demo.html
Turtlebot:
<script src="../src/index.js"></script>Pr2:
<script src="../src/index_pr2.js"></script>- Double click to set the Goal.
- Use WASD to control the robot.