navgoal_webgui.mp4
A WebGUI for publishing 2D Nav Goal (geometry_msgs::PoseStamped
)
This code is based on nav2djs
git clone https://github.com/Decwest/navgoal_webgui.git
sudo apt update
sudo apt install -y ros-$ROS_DISTRO-roswww ros-$ROS_DISTRO-tf2-web-republisher
roslaunch navgoal_webgui webserver.launch
-
Browse in your local PC http://localhost:8085/navgoal_webgui/index.html
-
Browse in other PCs or tablets in the same network http://<your local PC's ip address>:8085/navgoal_webgui/index.html
In Ubuntu, the ip address can be looked up as follows.
hostname -I
You can change the topic and tf names by modifiying parameters in the line 30 of index.html.
//######################################################################################//
//###################### config ######################//
//######################################################################################//
var map_topic = '/map';
var use_tf = true;
var map_frame = '/map';
var base_frame = '/base_link';
var robot_pose = '/robot_pose';
var topicName = '/move_base_simple/goal';
//######################################################################################//
-
map_topic (default: '/map')
- the name of subscribing map topic (type:
nav_msgs/OccupancyGrid
)
- the name of subscribing map topic (type:
-
use_tf (default: true)
- If true, the WebGUI obtains robot position by map_frame -> base_frame tf
- map_frame (default: '/map')
- base_frame (default: '/base_link')
- If false, the WebGUI obtains robot position by robot_pose topic (type:
geometry_msgs/Pose
)- robot_pose (default: '/robot_pose')
- If true, the WebGUI obtains robot position by map_frame -> base_frame tf
-
topicName (default: '/move_base_simple/goal' (same as the default setting of RViz))
- the name of publishing 2D nav goal topic (type:
geometry_msgs/PoseStamped
)
- the name of publishing 2D nav goal topic (type: