i’ve done mapping and navigation for my web interface but to set initial pose i use Rviz,
I would like to set the robot initial pose from the interface using double click but the event fires the navigation goal topic not the /initial_pose topic.
your help is much appreciated.
thanks in advance.
1 Like
Hi @mohamedSaleh77 ,
You can try gazebo services available to reset robot position to initial pose and use rosbridge service client to call it.
Check this method, from the official docs of roslibjs, for example
http://wiki.ros.org/roslibjs/Tutorials/BasicRosFunctionality
// Calling a service
67 // -----------------
68
69 var addTwoIntsClient = new ROSLIB.Service({
70 ros : ros,
71 name : '/add_two_ints',
72 serviceType : 'rospy_tutorials/AddTwoInts'
73 });
74
75 var request = new ROSLIB.ServiceRequest({
76 a : 1,
77 b : 2
78 });
79
80 addTwoIntsClient.callService(request, function(result) {
81 console.log('Result for service call on '
82 + addTwoIntsClient.name
83 + ': '
84 + result.sum);
85 });
You need to adjust to the correct service name and type, and pass the correct parameters as well
Regards
Hi @marco.nc.arruda
Thank you for your reply
I’ve done it by creating a publisher to /initial_pose taking the pose with covariance from navigator.js
Thanks & Regards
1 Like
Hello. I’m also having a problem with this issue. I can’t set the initial pose from web interface. Can you guide me to set the initial pose from web interface? Thank you.
@mohamedSaleh77
@marco.nc.arruda