Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using ROS with robot software version 2.7 #45

Closed
FabianPG11 opened this issue Feb 4, 2020 · 52 comments
Closed

Using ROS with robot software version 2.7 #45

FabianPG11 opened this issue Feb 4, 2020 · 52 comments

Comments

@FabianPG11
Copy link

Dear all,
I have a question regarding the ROS integration with MiR100 running robot software versions of 2.7 and 2.8.
As already mentioned in the previous issues, the ROS wrapper available in this repository is not compatible with versions older than 2.3. I was wondering what causes the problem and whether there is a fix for it.
Currently, we run the driver and the robot gets connected successfully, however, nothing happens after commanding velocities through /cmd_vel topic.
I would highly appreciate any help.

@FabianPG11 FabianPG11 changed the title Using ROS with 2.8 firmware Using ROS with robot software version 2.7 Feb 4, 2020
@kurtgeebelen
Copy link

Hello,

We contacted MIR for this issue. The problem is that the message type for /cmd_vel should be TwistStamped in stead of Twist on line 208 in mir_driver/nodes/mir_bridge.py .

Not sure if this changed in the MIR software (only tested with latest version), but this solved the problem for us, on a MIR 500, and I assume it will solve it on a MIR100/200 too.

@FabianPG11
Copy link
Author

Thanks for the reply. We have tested it on MiR100 running robot software version 2.7 and it worked.

@rsr152
Copy link

rsr152 commented Feb 28, 2020

Thanks. I am looking to measure the deceleration of a MiR 100 robot in an emergency stop (e-stop) situation. I am running software v 2.8.1 but can roll back to v2.8.0 if commanded velocities don’t t move the robot.

  1. Is there a way to measure deceleraton directly, or do we have to calculate it using the velocities v1 and v2 logged at times t1 and t2, and calculating acceleration = (v2-v1)/(t2-t1)

  2. Any ideas on how we can force the MiR 100 robot to come to an emergency stop without introducing a sudden physical barrier in its path? If we command the robot to travel along a straight line at say 1.0m/s and then command a velocity of 0, will it force an e-stop?

My understanding is that from the command line, this would translate to (would appreciate if someone could validate the command) :
rostopic pub /cmd_vel geometry_msgs/TwistStamped -r 5 -- '[1.0, 0.0, 0.0]' '[0.0, 0.0, 0.0]'
followed by
rostopic pub /cmd_vel geometry_msgs/TwistStamped -r 5 -- '[0.0, 0.0, 0.0]' '[0.0, 0.0, 0.0]'

Would welcome any other ideas to force an e-stop !

Thanks as always!

@rsr152
Copy link

rsr152 commented Feb 28, 2020

Hello,

We contacted MIR for this issue. The problem is that the message type for /cmd_vel should be TwistStamped in stead of Twist on line 208 in mir_driver/nodes/mir_bridge.py .

Not sure if this changed in the MIR software (only tested with latest version), but this solved the problem for us, on a MIR 500, and I assume it will solve it on a MIR100/200 too.

Hi all,

I was troubleshooting my problem and had a few updates. The result is setill the same (Nothing happens after commanding velocities through /cmd_vel topic.)

  1. I made the change suggested by @kurtgeebelen in line 208 in mir_driver/nodes/mir_bridge.py

  2. I also added the line
    geometry_msgs/TwistStamped twist
    in the file ~/catkin_ws/src/mir_robot/mir_msgs/msg/ExternalRobot.msg
    (not sure if I should have)

  3. roslaunch mir_driver mir.launch completes initialization successfully

  4. rosmsg show geometry_msgs/Twist returns the expected result
    geometry_msgs/Vector3 linear
    float64 x
    float64 y
    float64 z
    geometry_msgs/Vector3 angular
    float64 x
    float64 y
    float64 z

  5. rosmsg show geometry_msgs/TwistStamped returns:
    std_msgs/Header header
    uint32 seq
    time stamp
    string frame_id
    geometry_msgs/Twist twist
    geometry_msgs/Vector3 linear
    float64 x
    float64 y
    float64 z
    geometry_msgs/Vector3 angular
    float64 x
    float64 y
    float64 z

    (I was expecting the same result as Twist)

  6. A sample velocity command
    rostopic pub /cmd_vel geometry_msgs/TwistStamped -r 5 -- '[1.0, 0.0, 0.0]' '[0.0, 0.0, 0.0]'
    errors out with this message:
    _Traceback (most recent call last):
    File "/opt/ros/kinetic/bin/rostopic", line 35, in
    rostopic.rostopicmain()
    File "/opt/ros/kinetic/lib/python2.7/dist-packages/rostopic/init.py", line 2103, in rostopicmain
    _rostopic_cmd_pub(argv)
    File "/opt/ros/kinetic/lib/python2.7/dist-packages/rostopic/init.py", line 1789, in _rostopic_cmd_pub
    argv_publish(pub, msg_class, pub_args, rate, options.once, options.verbose, substitute_keywords=options.substitute_keywords)
    File "/opt/ros/kinetic/lib/python2.7/dist-packages/rostopic/init.py", line 1813, in argv_publish
    publish_message(pub, msg_class, pub_args, rate, once, verbose=verbose, substitute_keywords=substitute_keywords)
    File "/opt/ros/kinetic/lib/python2.7/dist-packages/rostopic/init.py", line 1663, in publish_message
    _fillMessageArgs(msg, pub_args)
    File "/opt/ros/kinetic/lib/python2.7/dist-packages/rostopic/init.py", line 1701, in _fillMessageArgs
    genpy.message.fill_message_args(msg, pub_args, keys=keys)
    File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/message.py", line 550, in fill_message_args
    _fill_message_args(msg, msg_args, keys, '')
    File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/message.py", line 508, in _fill_message_args
    _fill_val(msg, f, v, keys, prefix)
    File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/message.py", line 429, in _fill_val
    _fill_message_args(def_val, v, keys, prefix=(prefix+f+'.'))
    File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/message.py", line 508, in _fill_message_args
    _fill_val(msg, f, v, keys, prefix)
    File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/message.py", line 429, in _fill_val
    _fill_message_args(def_val, v, keys, prefix=(prefix+f+'.'))
    File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/message.py", line 510, in fill_message_args
    raise ValueError("invalid msg_args type: %s"%str(msg_args))
    ValueError: invalid msg_args type: 0.0

I'd appreciate any troubleshooting suggestions!

Thanks!

@kurtgeebelen
Copy link

You're not publishing a TwistStamped message in the correct way. Try this:

rostopic pub -r 5 /cmd_vel geometry_msgs/TwistStamped "{header: auto, twist:{linear:{x: 1, y: 0, z: 0}, angular:{x: 0, y: 0, z: 0}}}"

@FabianPG11
Copy link
Author

Hey,
I was wondering if there is a way to control mir100 sending goals for this version (2.7). In my case, I can command it with the topic /cmd_vel, however, it does not move with a simple goal navigation node. I tried with move_base and relative_move_action but none of them worked.
Any hint for this?

Thanks.

@rsr152
Copy link

rsr152 commented Mar 3, 2020

Thanks a lot @kurtgeebelen - It worked from the command line!

Is the change in mir_bridge.py the only change needed in the entire code base? Based on my limited understanding of ROS, I suspect there are other files (such as catkin_ws/src/mir_robot/mir_msgs/msg/ExternalRobot.msg) that will need to be modified, because the Twist message has a different structure from TwistStamped.

At a high level, I am trying to do this:
If (user wants to manually command a velocity) then
- publish TwistStamped message (as above)
elseif (user wants to run mission X) then
- (invoke API to complete the mission)
endif

I was able to do this using the Twist message in earlier versions of the MiR software.

@FaseehCS
Copy link

Hi I am also using MIR software version 2.8 and managed to move it using topic /cmd_vel by changing the msg type as described above. I am having the same issue with the topic /move_base and relative_move_action. Anyone who has used this, kindly comment on this. Thank you

@kurtgeebelen
Copy link

kurtgeebelen commented Mar 26, 2020

Hi all,

we had the same issue in trying to send a goal (x,y,orientation) to the MIR, and it didn't react or when it did react it didn't navigate to the correct position. We are now using the rest API to have it navigate to a desired posiiton. The position can then also be send from a script. Below is an example python script that we use for this. In the MIR itself you have to create position and a mission to drive to this position. The coordinates of this position are thus changed by this script (set_position)

import requests
import json
import time
import sys

 

# MIR settings
mir_ip_address = "192.168.50.123"

 

#generating the authorization key see restapi documentation
mir_authorization_Distributor = "your authorization code"
mir_headers = {
        "accept": "application/json",
        "Accept-Language": "en_US",
        "content-type": "application/json",
        "Authorization": mir_authorization_Distributor,
        }

 


# ----------------------------------- Get MIR State ---------------------------------------#
# retrieve the state number
def get_robot_state():
    # Request the status
    response = requests.get(mir_url + "status", headers=mir_headers)
    # Take out the state number from the code
    code = response.json()
    #state = code['state_id']
    # Return the state number
    return code

 

# ----------------------------------- Send MIR position --------------------------------------#
# start mission to specific location
# retrieve mission_id via output from get missions command

 

def set_position(GUID, x, y , orientation):

 

    data = {"pos_x": x, "pos_y": y, "orientation": orientation}

 

    # Send mission to mir
    response = requests.put(mir_url + "positions/"+GUID, headers=mir_headers, data=json.dumps(data))
    return response.json()    

 

# ----------------------------------- Send MIR on mission --------------------------------------#
# start mission to specific location
# retrieve mission_id via output from get missions command

 

def set_mission(GUID):
    data = {"mission_id": GUID}

 

    # write to log
    print("mir send on mission: " + GUID)

 

    # Send mission to mir
    response = requests.post(mir_url + "mission_queue", headers=mir_headers, data=json.dumps(data))
    return response.json()

 

if __name__ == "__main__":
    set_position("your guid", 5.0, 2.75 , 153)
    set_mission("your guid")

@FaseehCS
Copy link

Hi all,

we had the same issue in trying to send a goal (x,y,orientation) to the MIR, and it didn't react or when it did react it didn't navigate to the correct position. We are now using the rest API to have it navigate to a desired posiiton. The position can then also be send from a script. Below is an example python script that we use for this. In the MIR itself you have to create position and a mission to drive to this position. The coordinates of this position are thus changed by this script (set_position)

import requests
import json
import time
import sys

 

# MIR settings
mir_ip_address = "192.168.50.123"

 

#generating the authorization key see restapi documentation
mir_authorization_Distributor = "your authorization code"
mir_headers = {
        "accept": "application/json",
        "Accept-Language": "en_US",
        "content-type": "application/json",
        "Authorization": mir_authorization_Distributor,
        }

 


# ----------------------------------- Get MIR State ---------------------------------------#
# retrieve the state number
def get_robot_state():
    # Request the status
    response = requests.get(mir_url + "status", headers=mir_headers)
    # Take out the state number from the code
    code = response.json()
    #state = code['state_id']
    # Return the state number
    return code

 

# ----------------------------------- Send MIR position --------------------------------------#
# start mission to specific location
# retrieve mission_id via output from get missions command

 

def set_position(GUID, x, y , orientation):

 

    data = {"pos_x": x, "pos_y": y, "orientation": orientation}

 

    # Send mission to mir
    response = requests.put(mir_url + "positions/"+GUID, headers=mir_headers, data=json.dumps(data))
    return response.json()    

 

# ----------------------------------- Send MIR on mission --------------------------------------#
# start mission to specific location
# retrieve mission_id via output from get missions command

 

def set_mission(GUID):
    data = {"mission_id": GUID}

 

    # write to log
    print("mir send on mission: " + GUID)

 

    # Send mission to mir
    response = requests.post(mir_url + "mission_queue", headers=mir_headers, data=json.dumps(data))
    return response.json()

 

if __name__ == "__main__":
    set_position("your guid", 5.0, 2.75 , 153)
    set_mission("your guid")

Hi Kurt,
I have been working on MIR version 2.8.0.3 for a while now. I encountered the same problem. Since, this repo offers support for SW version 2.3 or earlier, I tried to fix the issues. The twistStamped msg solution as discussed above worked for /cmd_vel topic. Thank you for that. For move_base goal actions no luck so far. I am switching to Rest API now. The above code is a nice start indeed but I was wondering if you have done something more sophisticated with this API like, motion planning, mapping, etc.? If you have, is it possible that you can upload a code snippet for that as well, given its not private, offcourse.

Thank you

@mintar
Copy link
Member

mintar commented Jun 30, 2020

I don't have MiR Software 2.8 for testing. The latest I have is MiR software 2.6.0. From what I can tell, there are two main problems with using this driver for versions > 2.3.1:

  1. The cmd_vel topic type was changed from geometry_msgs/Twist to geometry_msgs/TwistStamped in MiR software 2.7.
  2. The MirMoveBaseAction was changed in MiR software 2.4.0. Sending MoveBaseAction goals over the mir_bridge no longer works.

I have just pushed a new branch melodic-2.8 where I'm attempting to fix these two things. The general idea behind the fixes is that the mir_bridge should continue to offer the standard topic types on the public ROS side, and translate them from/to the non-standard messages that the MiR uses:

topic (public) ROS side (internal) MiR side
cmd_vel geometry_msgs/Twist geometry_msgs/TwistStamped
move_base/result move_base_msgs/MoveBaseActionResult mir_actions/MirMoveBaseActionResult
move_base/goal move_base_msgs/MoveBaseActionGoal mir_actions/MirMoveBaseActionGoal
move_base/feedback move_base_msgs/MoveBaseActionFeedback mir_actions/MirMoveBaseActionFeedback

Based on the discussion in this issue, I'm relatively confident that 27652fa fixes the first problem (cmd_vel).

The commit 47c6aeb is my attempt at fixing the second issue (move_base). If you look at the commit, you'll see that lots of fields were added to the MirMoveBaseAction definition. I guess that the reason why the robot isn't moving is that we leave the move_task at its default value of 0, which means BASE_MOVE:

47c6aeb#diff-f84e16efd5bf3d46b6e08d6c36495fdcR3-R8

... so I'm setting it to GLOBAL_MOVE here and hope that this fixes it:

47c6aeb#diff-5fb6d7d4a121556dac4973fa51f0c2b2R38

Since I don't have access to the real robot (or MiR software 2.8) at the moment, I could not test these changes. So there is a significant chance that they won't work yet, but they should give you a starting point.

@BenziF @FaseehCS @FabianPG11 @rsr152 @kurtgeebelen : If you have the time, please test the branch melodic-2.8 and report back if it fixes the two problems.

@BenziF
Copy link

BenziF commented Jul 1, 2020

Hi mintar,

thank you very much for your quick reply. Due to COVID, we have limited access to our facilities, but next Tuesday I should be able to go and test the new branch of the code on our real robot (MiR software 2.8).

As a quick followup question, is there a way to synchronize the internal PC of the MiR from Ubuntu's command line? I did it using the web interface, but i need to press two buttons in it, one to get the time of my device and another one to save the info and setting it to the robot's internal system. As a result, when I run $ rosrun tf tf_monitor I get that the standard tf of the robot are fine (such as /back_laser_link, /imu_link), with avg delays of milliseconds, while the avg delay for /base_footprint is around 0.4 seconds. Is this acceptable, or is it gonna cause any issues with the transforms in your opinion? I have no idea why they decided to go with this interface, it's totally not convenient.

Anyway, I'll report back to you next Tuesday, and thanks again

@mintar
Copy link
Member

mintar commented Jul 1, 2020

As a quick followup question, is there a way to synchronize the internal PC of the MiR from Ubuntu's command line?

Not really. I have a working solution, but it's not very easy to install: We have an external PC integrated into our robot that is on the same wired network as the MiR PC; let's call it sensors-pc. That PC's clock is our reference clock. It's synced to an NTP clock whenever the sensors-pc has access to the internet. Next, I installed chrony on both the sensors-pc and the internal PC of the MiR, and set up the sensors-pc as the chrony server and the internal MiR PC as the chrony client. This way, the clocks on these systems always stay in sync without any manual interaction.

If you're wondering how you can install stuff on the internal MiR PC:

  • connect a monitor and keyboard to the ports that are exposed on one corner of the MiR
  • boot into a live USB linux system
  • chroot into the MiR PC
  • download chrony_2.1.1-1ubuntu0.1_amd64.deb, libtomcrypt0_1.17-7ubuntu0.1_amd64.deb, libtommath0_0.42.0-1.2_amd64.deb and timelimit_1.8-1_amd64.deb from a PC that has internet and install them in the chroot environment onto the MiR PC using dpkg -i
  • set up /etc/chrony/chrony.conf

Or you do what I did and build your own MiR update image that installs chrony. But that's not easier than the previous way. :)

Alternatively, maybe there's a way to set the clock using the REST API, but I haven't looked into that.

I did it using the web interface, but i need to press two buttons in it, one to get the time of my device and another one to save the info and setting it to the robot's internal system. As a result, when I run $ rosrun tf tf_monitor I get that the standard tf of the robot are fine (such as /back_laser_link, /imu_link), with avg delays of milliseconds, while the avg delay for /base_footprint is around 0.4 seconds. Is this acceptable, or is it gonna cause any issues with the transforms in your opinion?

It would be better if you could get it down to around 0.1 seconds, but that's not really easy using the manual method. I have only ever used the old interface, where they had only one button for setting the time.

I have no idea why they decided to go with this interface, it's totally not convenient.

Probably because in the "standard use case" for the MiR (i.e., not using ROS), it doesn't matter if the clocks are not in sync. But I agree, this is a major PITA for our use case.

@matthias-mayr
Copy link
Contributor

@FaseehCS and me tested the branch with our MIR. cmd_vel worked after applying the change in #56.
Sending goals also worked when we created a move_base action.

One time it also happened that the "planner" module on MIR dies "unexpectedly" and the button in the web interface went into the grey state after sending a goal from RViz. As of now we can only recover from that by rebooting.
When we tried it again after rebooting and reconnecting, we could use RViz to send goals though.

When starting the MIR bridge we also stumbled upon #57.

Another change that was necessary is in #58: MIR uses tf2.

@mintar
Copy link
Member

mintar commented Jul 1, 2020

Thanks for testing this and providing the pull requests! I've merged #56 and #57. I have my doubts about #58, but I'll post them over there.

Now that we know that this works, we'll have to think about how to merge it into the main melodic / kinetic / noetic branches. I don't plan on keeping the melodic-2.8 branch around. On the other hand, I don't want just merge this and break the repo for people who are not running 2.8.

Before merging, we'll need some mechanism like the following:

  • add a string parameter mir_sw_version that can be something like "2.3.1" or "2.8.0"
  • add some checks like if version_gte(mir_sw_version, '2.4.0'): ..., and only apply the changes in the melodic-2.8 branch where appropriate.

If any of you want to do that work and provide a pull request, that would be great! Otherwise it'll have to wait until I find the time.

@BenziF
Copy link

BenziF commented Jul 8, 2020

Hi @mintar and everyone, yesterday i was able to test the robot (version 2.8) using the new melodic-2-8 branch but sadly still nothing works. I tested posting to /cmd_vel but the MiR didn't move. I also launched roslaunch mir_navigation hector_mapping.launch, roslaunch mir_navigation move_base.xml with_virtual_walls:=false and rviz -d $(rospack find mir_navigation)/rviz/navigation.rviz, but it wasn't creating any map in rviz. I'm not aware if I should be launching anything different to move the robot or to read info from the /map topic.
The main issue that might be causing the fault, imho, is the time synchronization, since hector_mapping was complaining about the unability to transform from base_footprint to the other laser frames, probably because the avg delay is around 0.35 secs. Movebase too was complaining, send warnings in that regard. If you think this is the main cause, I'll have to find a way to synchronize the two PCs (which isn't a cakewalk), or I'll eventually need to revert back to version 2.3.1 of the MiR software.
Also, when i run tf_monitor, i don't see the odom_comb frame, as was written in the README, and also the topic itself /odom_comb isn't receiving any messages (I saw something similar in an open issue but there wasn't any solution to that).
I wasn't working on the robot using my PC, so i got some screenshots of the terminal as I launched mir_driver mir.launch, here below.
Screenshot from 2020-07-07 18-36-04
Screenshot from 2020-07-07 18-35-47

If it's my fault and I'm not launching the correct files, then my bad and I kindly as you to correct me. If instead you can ensure me that the problem lies in the synch, I'll find a way out. Thanks for everything btw :)

@mintar
Copy link
Member

mintar commented Jul 8, 2020

Thanks for testing and providing feedback! While 0.35 s time lag may cause some more subtle problems, I don't think that's the problem here. As long as the lag is below 10 s, the robot should at least move.

I have just merged #58 today. If I understand @matthias-mayr correctly, it's necessary to avoid the transform errors. So please pull the melodic-2.8 branch and try again.

Another thing that looks suspicious is the "topic 'move_base/feedback' is not published by the MiR!" warnings. Did you start the "planner" component in the MiR web interface?

@BenziF
Copy link

BenziF commented Jul 8, 2020

Thank you for all the support! Okay, I suspected it too, given the large timeout value, but still wasn't 100% sure.

Perfect, I'll try it next Tuesday! Sorry about the slow updates, but we still have limited access to the facilities.

Another thing that looks suspicious is the "topic 'move_base/feedback' is not published by the MiR!" warnings. Did you start the "planner" component in the MiR web

I went through most of the web interface and didn't find anything which resembled the "Service" -> "Configuration" -> "Launch menu" cited in the README, so I simply exported the master with export ROS_MASTER_URI=http://192.168.12.20:11311 and using rostopic list I found out one amcl topic and many move_base topics. Still this doesn't give me full confirmation, so I'll look into the user manual to see if I can find a Launch menu.

Also, quick followup question, do I need to push the Play button from the web interface? I tried both ways yesterday, as paused ( yellow LEDs) and active state (green LEDs) but still achieved nothing

@matthias-mayr
Copy link
Contributor

The layout of the web interface has changed. You can find it in "System --> Processes --> planner".

Although in our understanding it should have responded to the /cmd_vel commands. At least it worked for us before subscribing to /tf_static. I am also quite sure that we did not press the "play" button in the web interface when sending to /cmd_vel.

But #58 should be the reason why your transformations could not be resolved and therefore mapping on the ROS side should not work.

@BenziF
Copy link

BenziF commented Jul 8, 2020

The layout of the web interface has changed. You can find it in "System --> Processes --> planner".

Finally, thanks you, I don't know how I missed it. Now I can be 100% sure

Although in our understanding it should have responded to the /cmd_vel commands. At least it worked for us before subscribing to /tf_static. I am also quite sure that we did not press the "play" button in the web interface when sending to /cmd_vel.

All I did was launching roslaunch mir_driver mir.launch, opening another terminal and publishing a random msg on /cmd_vel, WITHOUT exporting the ROS master, but from my understanding that's how it's supposed to work (please correct me if I'm wrong). This failing really makes me question if something is wrong, since it shouldn't need any transform in order to move via cmd_vel.

@mintar
Copy link
Member

mintar commented Jul 9, 2020

I'm never in the green mode ("mission") when publishing goals from ROS, always either blue ("manual active") or yellow ("manual inactive"). Also remember that you must not do export ROS_MASTER_URI=http://192.168.12.20:11311 when you are running the mir_bridge; use export ROS_MASTER_URI=http://localhost:11311 or something to that effect instead.

Still, to check whether move_base has already been started on the robot it's a good idea to do what you did (something like ROS_MASTER_URI=http://192.168.12.20:11311 rostopic info move_base/feedback). Just make sure that mir_bridge is not also running on that ROS master.

@BenziF
Copy link

BenziF commented Jul 10, 2020

I'm never in the green mode ("mission") when publishing goals from ROS, always either blue ("manual active") or yellow ("manual inactive"). Also remember that you must not do export ROS_MASTER_URI=http://192.168.12.20:11311 when you are running the mir_bridge; use export ROS_MASTER_URI=http://localhost:11311 or something to that effect instead.

Okay all clear, thank you very much for the confirmation.

As a last question, does the procedure described in the README for the case of Gazebo (mapping) also works with the real robot? Namely, if I launch hector_mapping.launch move_base.xml with_virtual_walls:=false and rviz -d $(rospack find mir_navigation)/rviz/navigation.rviz would I obtain the map computed by the real MiR with the possibility of sending goals with the 2D goals tool of rviz? I always too this for granted, so please correct me if I'm wrong

@matthias-mayr
Copy link
Contributor

I have another question that might be related to the new software version. When connecting to the MIR I get to

mir_bridge: [MiR100Bridge.__init__]: [/mir_bridge] trying to connect to 192.168.12.20:9090...
mir_bridge: ### ROS bridge connected ###
mir_bridge: [MiR100Bridge.__init__]: [/mir_bridge] ... connected.

quite fast, but then there is an ~20s delay until it progresses with

mir_bridge: Publishers:
mir_bridge:  * /LightCtrl/bms_data [mirMsgs/BMSData]
...

Is this always the case or could it be due to some changes?

@mintar
Copy link
Member

mintar commented Jul 20, 2020

No, that's normal. It takes quite some time to get all the publishers and subscribers. I didn't debug where exactly the time lag occurs, but I guess it's all the back-and-forth of adding publishers and subscribers one by one via the websockets interface.

@MartinJensen37
Copy link

I just started working on the MiR in the lab with the melodic-2.8 branch. I managed to connect and sync the robot with a 0.2s delay, but when I try to send goals to the MiR with move_base_simple/goal the mir_bridge simply comes with the message seen in the screenshot:
move_base_goal
I have checked that the planner is running on the MiR through the web-interface. Has anyone else stumbled upon the same problem?

@mintar
Copy link
Member

mintar commented Oct 26, 2020

I'm still a bit confused which MiR versions now work and which don't.

@MartinJensen37 is running MiR software 2.8.3, and move_base isn't working (but cmd_vel is).

@BenziF @matthias-mayr @rsr152 : Could you please post which MiR software version exactly you're using (e.g. 2.8.1) and if move_base works with the current melodic-2.8 branch?

@mintar
Copy link
Member

mintar commented Oct 26, 2020

@MartinJensen37 : I suspect that something in the MirMoveBase action changed between MiR 2.8.* and 2.8.3.

  • The log you posted shows that all 5 move_base action topics (move_base/result, ...) are present on the MiR. Otherwise, you would have gotten a warning. So the "planner" is running.
  • Still, the mir_bridge cannot connect to the action server within 2 seconds.

Did you reduce the time delay between your PC and the MiR?

Some steps that would help debugging:

  • Stop the mir_bridge etc. and connect to the ROS core on the MiR's internal PC directly by running this command on your external PC: export ROS_MASTER_URI=http://192.168.12.20:11311
  • Run rostopic list -v and paste the result here.
  • Run rosbag record move_base/result move_base/feedback move_base/status move_base/goal move_base/cancel -O mir_move_base.bag and send the robot to a new pose goal from the web interface (no manual driving, but setting a new goal in the map). Check that the rosbaf is not empty (rosbag info mir_move_base.bag) and attach it here. I'm not sure whether setting a goal in the web interface actually triggers ROS messages on the move_base topics, but I hope it does.

@MartinJensen37
Copy link

I'm still a bit confused which MiR versions now work and which don't.
@MartinJensen37 is running MiR software 2.8.3, and move_base isn't working (but cmd_vel is).

Yes, I'm currently using the 2.8.3 and the /cmd_vel works but the /move_base_simple/goal doesn't.

@MartinJensen37
Copy link

@MartinJensen37 : I suspect that something in the MirMoveBase action changed between MiR 2.8.* and 2.8.3.

  • The log you posted shows that all 5 move_base action topics (move_base/result, ...) are present on the MiR. Otherwise, you would have gotten a warning. So the "planner" is running.
  • Still, the mir_bridge cannot connect to the action server within 2 seconds.

Did you reduce the time delay between your PC and the MiR?

Some steps that would help debugging:

  • Stop the mir_bridge etc. and connect to the ROS core on the MiR's internal PC directly by running this command on your external PC: export ROS_MASTER_URI=http://192.168.12.20:11311
  • Run rostopic list -v and paste the result here.
  • Run rosbag record move_base/result move_base/feedback move_base/status move_base/goal move_base/cancel -O mir_move_base.bag and send the robot to a new pose goal from the web interface (no manual driving, but setting a new goal in the map). Check that the rosbaf is not empty (rosbag info mir_move_base.bag) and attach it here. I'm not sure whether setting a goal in the web interface actually triggers ROS messages on the move_base topics, but I hope it does.

I'll try and do this now. I'll report back with some screenshots and a status for the rosbag.

@mintar
Copy link
Member

mintar commented Oct 26, 2020

I'll report back with some screenshots

As an aside: You can also just copy-paste text from the terminal, that's better than taking screenshots.

@MartinJensen37
Copy link

This is going to be a bit long, but here is the output from the rostopic list -v:

Published topics:
 * /map_metadata [nav_msgs/MapMetaData] 1 publisher
 * /move_base_node/local_costmap/obstacles [nav_msgs/GridCells] 1 publisher
 * /move_base_node/MIRPlannerROS/local_plan [nav_msgs/Path] 1 publisher
 * /move_base/feedback [mir_actions/MirMoveBaseActionFeedback] 1 publisher
 * /camera_floor_right/driver/color/image_raw/compressed/parameter_descriptions [dynamic_reconfigure/ConfigDescription] 1 publisher
 * /move_base_node/global_costmap/unknown_space [nav_msgs/GridCells] 1 publisher
 * /camera_floor_left/driver/detect_rack_obstacles [sensor_msgs/PointCloud2] 1 publisher
 * /scan [sensor_msgs/LaserScan] 2 publishers
 * /camera_floor_right/driver/color/image_raw [sensor_msgs/Image] 1 publisher
 * /move_base_node/MIRPlannerROS/cost_cloud [sensor_msgs/PointCloud2] 1 publisher
 * /camera_floor_left/driver/color/camera_info [sensor_msgs/CameraInfo] 1 publisher
 * /LightCtrl/us_list [sensor_msgs/Range] 1 publisher
 * /robot_mode [mirMsgs/RobotMode] 1 publisher
 * /mirwebapp/laser_map_metadata [mirMsgs/LocalMapStat] 1 publisher
 * /move_base_node/MIRPlannerROS/global_plan [nav_msgs/Path] 1 publisher
 * /camera_floor_left/driver/color/image_raw/compressed/parameter_descriptions [dynamic_reconfigure/ConfigDescription] 1 publisher
 * /move_base/status [actionlib_msgs/GoalStatusArray] 1 publisher
 * /robot_state [mirMsgs/RobotState] 1 publisher
 * /b_raw_scan [sensor_msgs/LaserScan] 1 publisher
 * /particlevizmarker [visualization_msgs/MarkerArray] 1 publisher
 * /one_way_map [nav_msgs/OccupancyGrid] 1 publisher
 * /mirEventTrigger/events [mirMsgs/Events] 1 publisher
 * /wifi_diagnostics/roam_events [mir_wifi_msgs/WifiRoamEvent] 2 publishers
 * /camera_floor_right/driver/depth/image_rect_raw [sensor_msgs/Image] 1 publisher
 * /tf [tf2_msgs/TFMessage] 4 publishers
 * /move_base_node/global_costmap/obstacles [nav_msgs/GridCells] 1 publisher
 * /camera_floor_left/driver/parameter_updates [dynamic_reconfigure/Config] 1 publisher
 * /move_base_node/traffic_costmap/obstacles [nav_msgs/GridCells] 1 publisher
 * /session_importer_node/info [mirSessionImporter/SessionImportInfo] 1 publisher
 * /MC/currents [sdc21x0/MotorCurrents] 1 publisher
 * /active_mapping_guid [std_msgs/String] 1 publisher
 * /mirwebapp/web_path [mirMsgs/WebPath] 1 publisher
 * /SickPLC/parameter_descriptions [dynamic_reconfigure/ConfigDescription] 1 publisher
 * /move_base_node/global_costmap/robot_footprint [geometry_msgs/PolygonStamped] 1 publisher
 * /MissionController/CheckArea/visualization_marker [visualization_msgs/Marker] 1 publisher
 * /camera_floor_left/driver/depth/image_rect_raw/compressed/parameter_updates [dynamic_reconfigure/Config] 1 publisher
 * /move_base_node/parameter_descriptions [dynamic_reconfigure/ConfigDescription] 1 publisher
 * /camera_floor_left/driver/color/image_raw [sensor_msgs/Image] 1 publisher
 * /mir_amcl/parameter_updates [dynamic_reconfigure/Config] 1 publisher
 * /move_base_node/current_goal [geometry_msgs/PoseStamped] 1 publisher
 * /camera_floor_right/filter/visualization_marker [visualization_msgs/Marker] 1 publisher
 * /camera_floor_left/driver/color/image_raw/compressed/parameter_updates [dynamic_reconfigure/Config] 1 publisher
 * /camera_floor_right/driver/depth/camera_info [sensor_msgs/CameraInfo] 1 publisher
 * /camera_floor_left/driver/depth/camera_info [sensor_msgs/CameraInfo] 1 publisher
 * /data_events/positions [mir_data_msgs/PositionEvent] 1 publisher
 * /move_base_node/visualization_marker [visualization_msgs/Marker] 1 publisher
 * /MissionController/goal_position_guid [std_msgs/String] 1 publisher
 * /camera_floor_right/driver/depth/image_rect_raw/compressed/parameter_descriptions [dynamic_reconfigure/ConfigDescription] 1 publisher
 * /mir_log [rosgraph_msgs/Log] 1 publisher
 * /camera_floor_left/driver/color/image_raw/compressed [sensor_msgs/CompressedImage] 1 publisher
 * /move_base_node/global_costmap/inflated_obstacles [nav_msgs/GridCells] 1 publisher
 * /move_base_node/MIRPlannerROS/parameter_descriptions [dynamic_reconfigure/ConfigDescription] 1 publisher
 * /camera_floor_right/driver/color/camera_info [sensor_msgs/CameraInfo] 1 publisher
 * /wifi_diagnostics/wifi_ap_time_stats [mir_wifi_msgs/APTimeStats] 1 publisher
 * /scan_filter/visualization_marker [visualization_msgs/Marker] 1 publisher
 * /robot_status [mirMsgs/RobotStatus] 1 publisher
 * /move_base_node/parameter_updates [dynamic_reconfigure/Config] 1 publisher
 * /f_scan [sensor_msgs/LaserScan] 1 publisher
 * /camera_floor_left/driver/detect_pallet_obstacles [sensor_msgs/PointCloud2] 1 publisher
 * /wifi_diagnostics/cur_ap [mir_wifi_msgs/APInfo] 1 publisher
 * /data_events/area_events [mir_data_msgs/AreaEventEvent] 1 publisher
 * /odom_enc [nav_msgs/Odometry] 1 publisher
 * /move_base_node/MIRPlannerROS/updated_global_plan [mirMsgs/PlanSegments] 1 publisher
 * /localization_score [std_msgs/Float64] 1 publisher
 * /mir_status_msg [std_msgs/String] 3 publishers
 * /camera_floor_right/background [sensor_msgs/PointCloud2] 1 publisher
 * /move_base/goal [mir_actions/MirMoveBaseActionGoal] 2 publishers
 * /move_base_node/SBPLLatticePlanner/plan [nav_msgs/Path] 1 publisher
 * /MissionController/prompt_user [mirMsgs/UserPrompt] 1 publisher
 * /camera_floor_right/driver/depth/image_rect_raw/compressed/parameter_updates [dynamic_reconfigure/Config] 1 publisher
 * /camera_floor_right/floor [sensor_msgs/PointCloud2] 1 publisher
 * /scan_filter/parameter_descriptions [dynamic_reconfigure/ConfigDescription] 1 publisher
 * /SickPLC/parameter_updates [dynamic_reconfigure/Config] 1 publisher
 * /set_mc_PID [std_msgs/Float64MultiArray] 1 publisher
 * /diagnostics_toplevel_state [diagnostic_msgs/DiagnosticStatus] 1 publisher
 * /camera_floor_left/driver/depth/image_rect_raw [sensor_msgs/Image] 1 publisher
 * /wifi_diagnostics/wifi_ap_rssi [mir_wifi_msgs/APRssiStats] 1 publisher
 * /camera_floor_left/driver/visualization_marker [visualization_msgs/MarkerArray] 1 publisher
 * /camera_floor_left/driver/depth/color/points [sensor_msgs/PointCloud2] 1 publisher
 * /camera_floor_right/driver/parameter_descriptions [dynamic_reconfigure/ConfigDescription] 1 publisher
 * /LightCtrl/bms_data [mirMsgs/BMSData] 1 publisher
 * /traffic_map [nav_msgs/OccupancyGrid] 1 publisher
 * /resource_tracker/needed_resources [mirMsgs/ResourcesState] 1 publisher
 * /wifi_diagnostics [diagnostic_msgs/DiagnosticArray] 1 publisher
 * /wifi_diagnostics/wifi_ap_interface_stats [mir_wifi_msgs/WifiInterfaceStats] 1 publisher
 * /marker_tracking_node/laser_line_extract/parameter_descriptions [dynamic_reconfigure/ConfigDescription] 1 publisher
 * /wifi_watchdog/ping [mir_wifi_msgs/APPingStats] 1 publisher
 * /marker_tracking_node/status [actionlib_msgs/GoalStatusArray] 1 publisher
 * /camera_floor_right/driver/detect_rack_obstacles [sensor_msgs/PointCloud2] 1 publisher
 * /move_base_node/MIRPlannerROS/len_to_goal [std_msgs/Float64] 1 publisher
 * /move_base_node/MIRPlannerROS/parameter_updates [dynamic_reconfigure/Config] 1 publisher
 * /camera_floor_left/driver/depth/image_rect_raw/compressed [sensor_msgs/CompressedImage] 1 publisher
 * /move_base_node/traffic_costmap/parameter_descriptions [dynamic_reconfigure/ConfigDescription] 1 publisher
 * /move_base_node/global_plan [nav_msgs/Path] 1 publisher
 * /move_base_node/MIRPlannerROS/visualization_marker [visualization_msgs/MarkerArray] 1 publisher
 * /param_update [std_msgs/String] 1 publisher
 * /camera_floor_right/driver/detect_pallet_obstacles [sensor_msgs/PointCloud2] 1 publisher
 * /mir_sound/sound_event [mirMsgs/SoundEvent] 1 publisher
 * /camera_floor_right/driver/depth/image_rect_raw/compressed [sensor_msgs/CompressedImage] 1 publisher
 * /mir_cmd [std_msgs/String] 1 publisher
 * /tf_static [tf2_msgs/TFMessage] 15 publishers
 * /move_base_node/traffic_costmap/inflated_obstacles [nav_msgs/GridCells] 1 publisher
 * /laser_front/driver/parameter_updates [dynamic_reconfigure/Config] 1 publisher
 * /diagnostics [diagnostic_msgs/DiagnosticArray] 12 publishers
 * /cmd_vel [geometry_msgs/TwistStamped] 2 publishers
 * /marker_tracking_node/laser_line_extract/parameter_updates [dynamic_reconfigure/Config] 1 publisher
 * /data_events/sounds [mir_data_msgs/SoundEvent] 1 publisher
 * /rosout [rosgraph_msgs/Log] 55 publishers
 * /move_base_node/traffic_costmap/parameter_updates [dynamic_reconfigure/Config] 1 publisher
 * /marker_tracking_node/laser_line_extract/visualization_marker [visualization_msgs/Marker] 1 publisher
 * /marker_tracking_node/feedback [mir_marker_tracking/MarkerTrackingActionFeedback] 1 publisher
 * /data_events/registers [mir_data_msgs/PLCRegisterEvent] 1 publisher
 * /move_base_node/traffic_costmap/unknown_space [nav_msgs/GridCells] 1 publisher
 * /camera_floor_left/filter/visualization_marker [visualization_msgs/Marker] 1 publisher
 * /move_base_node/local_costmap/safety_zone [geometry_msgs/PolygonStamped] 1 publisher
 * /check_pose_area/polygon [geometry_msgs/PolygonStamped] 1 publisher
 * /move_base_node/local_costmap/parameter_descriptions [dynamic_reconfigure/ConfigDescription] 1 publisher
 * /data_events/maps [mir_data_msgs/MapEvent] 1 publisher
 * /MC/battery_voltage [std_msgs/Float64] 1 publisher
 * /move_base/cancel [actionlib_msgs/GoalID] 1 publisher
 * /move_base_node/local_costmap/robot_footprint [geometry_msgs/PolygonStamped] 1 publisher
 * /camera_floor_left/driver/parameter_descriptions [dynamic_reconfigure/ConfigDescription] 1 publisher
 * /camera_floor_right/driver/color/image_raw/compressed [sensor_msgs/CompressedImage] 1 publisher
 * /amcl_pose [geometry_msgs/PoseWithCovarianceStamped] 1 publisher
 * /camera_floor_right/driver/parameter_updates [dynamic_reconfigure/Config] 1 publisher
 * /camera_floor_right/driver/extrinsics/depth_to_color [realsense2_camera/Extrinsics] 1 publisher
 * /LightCtrl/charging_state [mirMsgs/ChargingState] 1 publisher
 * /rosout_agg [rosgraph_msgs/Log] 1 publisher
 * /MC/encoders [sdc21x0/StampedEncoders] 1 publisher
 * /odom [nav_msgs/Odometry] 1 publisher
 * /move_base_node/local_costmap/inflated_obstacles [nav_msgs/GridCells] 1 publisher
 * /camera_floor_right/driver/depth/color/points [sensor_msgs/PointCloud2] 1 publisher
 * /light_cmd [std_msgs/String] 4 publishers
 * /imu_data [sensor_msgs/Imu] 1 publisher
 * /f_raw_scan [sensor_msgs/LaserScan] 1 publisher
 * /mir_amcl/selected_points [sensor_msgs/PointCloud2] 1 publisher
 * /move_base_node/traffic_costmap/robot_footprint [geometry_msgs/PolygonStamped] 1 publisher
 * /camera_floor_left/driver/extrinsics/depth_to_color [realsense2_camera/Extrinsics] 1 publisher
 * /camera_floor_left/obstacles [sensor_msgs/PointCloud2] 1 publisher
 * /move_base_node/global_costmap/parameter_updates [dynamic_reconfigure/Config] 1 publisher
 * /mir_amcl/parameter_descriptions [dynamic_reconfigure/ConfigDescription] 1 publisher
 * /scan_filter/parameter_updates [dynamic_reconfigure/Config] 1 publisher
 * /camera_floor_right/obstacles [sensor_msgs/PointCloud2] 1 publisher
 * /move_base_node/time_to_coll [std_msgs/Float64] 1 publisher
 * /move_base_node/SBPLLatticePlanner/sbpl_lattice_planner_stats [sbpl_lattice_planner/SBPLLatticePlannerStats] 1 publisher
 * /map [nav_msgs/OccupancyGrid] 1 publisher
 * /laser_back/driver/parameter_updates [dynamic_reconfigure/Config] 1 publisher
 * /mirwebapp/grid_map_metadata [mirMsgs/LocalMapStat] 1 publisher
 * /move_base_node/global_costmap/parameter_descriptions [dynamic_reconfigure/ConfigDescription] 1 publisher
 * /b_scan [sensor_msgs/LaserScan] 1 publisher
 * /camera_floor_left/driver/depth/image_rect_raw/compressed/parameter_descriptions [dynamic_reconfigure/ConfigDescription] 1 publisher
 * /marker_tracking_node/result [mir_marker_tracking/MarkerTrackingActionResult] 1 publisher
 * /laser_front/driver/parameter_descriptions [dynamic_reconfigure/ConfigDescription] 1 publisher
 * /laser_back/driver/parameter_descriptions [dynamic_reconfigure/ConfigDescription] 1 publisher
 * /move_base_node/SBPLLatticePlanner/visualization_marker [visualization_msgs/MarkerArray] 1 publisher
 * /initialpose [geometry_msgs/PoseWithCovarianceStamped] 1 publisher
 * /move_base_simple/visualization_marker [visualization_msgs/Marker] 1 publisher
 * /mirspawn/node_events [mirSpawn/LaunchItem] 1 publisher
 * /MC/battery_currents [mirMsgs/BatteryCurrents] 1 publisher
 * /camera_floor_left/background [sensor_msgs/PointCloud2] 1 publisher
 * /move_base_node/local_costmap/unknown_space [nav_msgs/GridCells] 1 publisher
 * /camera_floor_left/floor [sensor_msgs/PointCloud2] 1 publisher
 * /camera_floor_right/driver/color/image_raw/compressed/parameter_updates [dynamic_reconfigure/Config] 1 publisher
 * /move_base_node/local_costmap/parameter_updates [dynamic_reconfigure/Config] 1 publisher
 * /camera_floor_right/driver/visualization_marker [visualization_msgs/MarkerArray] 1 publisher
 * /move_base/result [mir_actions/MirMoveBaseActionResult] 1 publisher
 * /move_base_node/mir_escape_recovery/visualization_marker [visualization_msgs/Marker] 1 publisher
 * /diagnostics_agg [diagnostic_msgs/DiagnosticArray] 1 publisher
 * /robot_pose [geometry_msgs/Pose] 2 publishers
 * /check_area/polygon [geometry_msgs/PolygonStamped] 1 publisher

Subscribed topics:
 * /map_metadata [nav_msgs/MapMetaData] 3 subscribers
 * /move_base_node/local_costmap/obstacles [nav_msgs/GridCells] 1 subscriber
 * /move_base_node/MIRPlannerROS/cost_cloud [sensor_msgs/PointCloud2] 1 subscriber
 * /move_base/feedback [mir_actions/MirMoveBaseActionFeedback] 2 subscribers
 * /move_base_node/global_costmap/unknown_space [nav_msgs/GridCells] 1 subscriber
 * /proximity_sensors/filtered_cloud [sensor_msgs/PointCloud] 1 subscriber
 * /data_events/registers [mir_data_msgs/PLCRegisterEvent] 1 subscriber
 * /camera_floor_left/driver/detect_rack_obstacles [sensor_msgs/PointCloud2] 1 subscriber
 * /scan [sensor_msgs/LaserScan] 5 subscribers
 * /LightCtrl/us_list [sensor_msgs/Range] 1 subscriber
 * /robot_mode [mirMsgs/RobotMode] 4 subscribers
 * /mirwebapp/laser_map_metadata [mirMsgs/LocalMapStat] 1 subscriber
 * /move_base_node/MIRPlannerROS/global_plan [nav_msgs/Path] 1 subscriber
 * /camera_floor/obstacles [sensor_msgs/PointCloud2] 1 subscriber
 * /move_base/status [actionlib_msgs/GoalStatusArray] 2 subscribers
 * /robot_state [mirMsgs/RobotState] 2 subscribers
 * /b_raw_scan [sensor_msgs/LaserScan] 2 subscribers
 * /particlevizmarker [visualization_msgs/MarkerArray] 1 subscriber
 * /one_way_map [nav_msgs/OccupancyGrid] 2 subscribers
 * /mirEventTrigger/events [mirMsgs/Events] 2 subscribers
 * /wifi_diagnostics/roam_events [mir_wifi_msgs/WifiRoamEvent] 2 subscribers
 * /move_base_node/traffic_costmap/obstacles [nav_msgs/GridCells] 1 subscriber
 * /session_importer_node/info [mirSessionImporter/SessionImportInfo] 1 subscriber
 * /MC/currents [sdc21x0/MotorCurrents] 1 subscriber
 * /active_mapping_guid [std_msgs/String] 1 subscriber
 * /robot_tracker/tracked_robots [mirMsgs/ExternalRobots] 1 subscriber
 * /mirwebapp/web_path [mirMsgs/WebPath] 1 subscriber
 * /hook/status [mirMsgs/HookStatus] 2 subscribers
 * /move_base_node/global_costmap/robot_footprint [geometry_msgs/PolygonStamped] 1 subscriber
 * /MissionController/CheckArea/visualization_marker [visualization_msgs/Marker] 1 subscriber
 * /camera_top/background [sensor_msgs/PointCloud2] 1 subscriber
 * /move_base_node/current_goal [geometry_msgs/PoseStamped] 1 subscriber
 * /move_base_node/global_costmap/obstacles [nav_msgs/GridCells] 1 subscriber
 * /MC/battery_voltage [std_msgs/Float64] 2 subscribers
 * /f_scan [sensor_msgs/LaserScan] 3 subscribers
 * /move_base_node/visualization_marker [visualization_msgs/Marker] 1 subscriber
 * /MissionController/goal_position_guid [std_msgs/String] 2 subscribers
 * /mir_log [rosgraph_msgs/Log] 1 subscriber
 * /move_base_node/global_costmap/inflated_obstacles [nav_msgs/GridCells] 1 subscriber
 * /wifi_diagnostics/wifi_ap_time_stats [mir_wifi_msgs/APTimeStats] 1 subscriber
 * /scan_filter/visualization_marker [visualization_msgs/Marker] 1 subscriber
 * /marker_tracking_node/goal [mir_marker_tracking/MarkerTrackingActionGoal] 1 subscriber
 * /camera_floor_left/driver/detect_pallet_obstacles [sensor_msgs/PointCloud2] 1 subscriber
 * /wifi_diagnostics/cur_ap [mir_wifi_msgs/APInfo] 2 subscribers
 * /data_events/area_events [mir_data_msgs/AreaEventEvent] 1 subscriber
 * /odom_enc [nav_msgs/Odometry] 1 subscriber
 * /localization_score [std_msgs/Float64] 2 subscribers
 * /move_base_node/mir_escape_recovery/visualization_marker [visualization_msgs/Marker] 1 subscriber
 * /mir_status_msg [std_msgs/String] 2 subscribers
 * /camera_floor_right/background [sensor_msgs/PointCloud2] 1 subscriber
 * /move_base/goal [mir_actions/MirMoveBaseActionGoal] 2 subscribers
 * /MissionController/prompt_user [mirMsgs/UserPrompt] 2 subscribers
 * /PB/gpio/input [mirMsgs/Gpio] 1 subscriber
 * /diagnostics_toplevel_state [diagnostic_msgs/DiagnosticStatus] 1 subscriber
 * /wifi_diagnostics/wifi_ap_rssi [mir_wifi_msgs/APRssiStats] 3 subscribers
 * /camera_floor_left/driver/visualization_marker [visualization_msgs/MarkerArray] 1 subscriber
 * /camera_top/obstacles [sensor_msgs/PointCloud2] 1 subscriber
 * /move_base_simple/visualization_marker [visualization_msgs/Marker] 1 subscriber
 * /LightCtrl/bms_data [mirMsgs/BMSData] 2 subscribers
 * /traffic_map [nav_msgs/OccupancyGrid] 2 subscribers
 * /resource_tracker/needed_resources [mirMsgs/ResourcesState] 2 subscribers
 * /joystick_vel [mirMsgs/JoystickVel] 2 subscribers
 * /wifi_diagnostics [diagnostic_msgs/DiagnosticArray] 1 subscriber
 * /stall_detection [std_msgs/Bool] 1 subscriber
 * /wifi_diagnostics/wifi_ap_interface_stats [mir_wifi_msgs/WifiInterfaceStats] 2 subscribers
 * /tf [tf2_msgs/TFMessage] 10 subscribers
 * /wifi_watchdog/ping [mir_wifi_msgs/APPingStats] 2 subscribers
 * /marker_tracking_node/status [actionlib_msgs/GoalStatusArray] 1 subscriber
 * /ultrasonic_sensors/pointcloud_combined [sensor_msgs/PointCloud] 1 subscriber
 * /camera_floor_right/driver/detect_rack_obstacles [sensor_msgs/PointCloud2] 1 subscriber
 * /move_base_node/MIRPlannerROS/len_to_goal [std_msgs/Float64] 2 subscribers
 * /resource_tracker/world_model [mirMsgs/WorldModel] 1 subscriber
 * /move_base_node/global_plan [nav_msgs/Path] 2 subscribers
 * /set_mc_PID [std_msgs/Float64MultiArray] 2 subscribers
 * /param_update [std_msgs/String] 16 subscribers
 * /camera_floor_right/driver/detect_pallet_obstacles [sensor_msgs/PointCloud2] 1 subscriber
 * /mir_sound/sound_event [mirMsgs/SoundEvent] 1 subscriber
 * /mir_cmd [std_msgs/String] 2 subscribers
 * /tf_static [tf2_msgs/TFMessage] 10 subscribers
 * /move_base_node/traffic_costmap/inflated_obstacles [nav_msgs/GridCells] 1 subscriber
 * /robot_status [mirMsgs/RobotStatus] 3 subscribers
 * /diagnostics [diagnostic_msgs/DiagnosticArray] 2 subscribers
 * /cmd_vel [geometry_msgs/TwistStamped] 2 subscribers
 * /move_base_node/MIRPlannerROS/local_plan [nav_msgs/Path] 1 subscriber
 * /data_events/sounds [mir_data_msgs/SoundEvent] 1 subscriber
 * /rosout [rosgraph_msgs/Log] 3 subscribers
 * /marker_tracking_node/laser_line_extract/visualization_marker [visualization_msgs/Marker] 1 subscriber
 * /rosout_agg [rosgraph_msgs/Log] 1 subscriber
 * /safety_status [mirMsgs/SafetyStatus] 2 subscribers
 * /move_base_node/traffic_costmap/unknown_space [nav_msgs/GridCells] 1 subscriber
 * /move_base_node/local_costmap/safety_zone [geometry_msgs/PolygonStamped] 1 subscriber
 * /check_pose_area/polygon [geometry_msgs/PolygonStamped] 1 subscriber
 * /data_events/maps [mir_data_msgs/MapEvent] 1 subscriber
 * /data_events/positions [mir_data_msgs/PositionEvent] 1 subscriber
 * /move_base/cancel [actionlib_msgs/GoalID] 2 subscribers
 * /move_base_node/local_costmap/robot_footprint [geometry_msgs/PolygonStamped] 1 subscriber
 * /amcl_pose [geometry_msgs/PoseWithCovarianceStamped] 1 subscriber
 * /move_base_node/MIRPlannerROS/visualization_marker [visualization_msgs/MarkerArray] 1 subscriber
 * /LightCtrl/charging_state [mirMsgs/ChargingState] 2 subscribers
 * /camera_floor/background [sensor_msgs/PointCloud2] 1 subscriber
 * /marker_tracking_node/feedback [mir_marker_tracking/MarkerTrackingActionFeedback] 1 subscriber
 * /MC/encoders [sdc21x0/StampedEncoders] 3 subscribers
 * /odom [nav_msgs/Odometry] 5 subscribers
 * /move_base_node/local_costmap/inflated_obstacles [nav_msgs/GridCells] 2 subscribers
 * /move_base_node/SBPLLatticePlanner/plan [nav_msgs/Path] 1 subscriber
 * /light_cmd [std_msgs/String] 2 subscribers
 * /imu_data [sensor_msgs/Imu] 2 subscribers
 * /f_raw_scan [sensor_msgs/LaserScan] 2 subscribers
 * /mir_amcl/selected_points [sensor_msgs/PointCloud2] 1 subscriber
 * /move_base_node/traffic_costmap/robot_footprint [geometry_msgs/PolygonStamped] 1 subscriber
 * /move_base_simple/goal [geometry_msgs/PoseStamped] 1 subscriber
 * /robot_tracker/robots_pointcloud [sensor_msgs/PointCloud2] 1 subscriber
 * /camera_floor_left/obstacles [sensor_msgs/PointCloud2] 2 subscribers
 * /camera_floor_right/obstacles [sensor_msgs/PointCloud2] 2 subscribers
 * /move_base_node/time_to_coll [std_msgs/Float64] 1 subscriber
 * /move_base_node/SBPLLatticePlanner/sbpl_lattice_planner_stats [sbpl_lattice_planner/SBPLLatticePlannerStats] 1 subscriber
 * /map [nav_msgs/OccupancyGrid] 3 subscribers
 * /mirwebapp/grid_map_metadata [mirMsgs/LocalMapStat] 1 subscriber
 * /b_scan [sensor_msgs/LaserScan] 3 subscribers
 * /marker_tracking_node/result [mir_marker_tracking/MarkerTrackingActionResult] 1 subscriber
 * /move_base_node/MIRPlannerROS/updated_global_plan [mirMsgs/PlanSegments] 2 subscribers
 * /move_base_node/SBPLLatticePlanner/visualization_marker [visualization_msgs/MarkerArray] 1 subscriber
 * /initialpose [geometry_msgs/PoseWithCovarianceStamped] 2 subscribers
 * /marker_tracking_node/cancel [actionlib_msgs/GoalID] 1 subscriber
 * /mirspawn/node_events [mirSpawn/LaunchItem] 2 subscribers
 * /MC/battery_currents [mirMsgs/BatteryCurrents] 2 subscribers
 * /camera_floor_left/background [sensor_msgs/PointCloud2] 1 subscriber
 * /move_base_node/local_costmap/unknown_space [nav_msgs/GridCells] 1 subscriber
 * /camera_floor_right/driver/visualization_marker [visualization_msgs/MarkerArray] 1 subscriber
 * /move_base/result [mir_actions/MirMoveBaseActionResult] 2 subscribers
 * /robot_tracker/external_robots [mirMsgs/ExternalRobots] 1 subscriber
 * /diagnostics_agg [diagnostic_msgs/DiagnosticArray] 5 subscribers
 * /robot_pose [geometry_msgs/Pose] 5 subscribers
 * /check_area/polygon [geometry_msgs/PolygonStamped] 1 subscriber

And then I have the rosbag info. I gave 3 goals through the web interface and I can see 3 messages:

path:        mir_move_base.bag
version:     2.0
duration:    1:46s (106s)
start:       Oct 26 2020 13:05:15.30 (1603713915.30)
end:         Oct 26 2020 13:07:01.90 (1603714021.90)
size:        333.8 KB
messages:    1060
compression: none [1/1 chunks]
types:       actionlib_msgs/GoalID                 [302881f31927c1df708a2dbab0e80ee8]
             actionlib_msgs/GoalStatusArray        [8b2b82f13216d0a8ea88bd3af735e619]
             mir_actions/MirMoveBaseActionFeedback [8028ef11fcc6dd47ce8cdcf869f32b28]
             mir_actions/MirMoveBaseActionGoal     [914bd5ff203b40ccedbfd67f69a6ec0d]
             mir_actions/MirMoveBaseActionResult   [bba42cc37afb0f3bc0d230821314e0cd]
topics:      move_base/cancel       3 msgs    : actionlib_msgs/GoalID                
             move_base/feedback   511 msgs    : mir_actions/MirMoveBaseActionFeedback
             move_base/goal         3 msgs    : mir_actions/MirMoveBaseActionGoal    
             move_base/result       3 msgs    : mir_actions/MirMoveBaseActionResult  
             move_base/status     540 msgs    : actionlib_msgs/GoalStatusArray

@MartinJensen37
Copy link

MartinJensen37 commented Oct 26, 2020

Did you reduce the time delay between your PC and the MiR?

Yes, the delay currently is 0.2s approx. instead of 20-30s.

@mintar
Copy link
Member

mintar commented Oct 26, 2020

And then I have the rosbag info. I gave 3 goals through the web interface and I can see 3 messages:

Great! Could you please upload the rosbag?

@MartinJensen37
Copy link

Great! Could you please upload the rosbag?

Github doesn't allow me to upload the file in the comments, so maybe we can put it somewhere else? Where do you prefer?

@mintar
Copy link
Member

mintar commented Oct 26, 2020

I don't care - Dropbox, Google Drive, Mega.nz... your choice.

@MartinJensen37
Copy link

Here is a link for the .bag file then: https://drive.google.com/file/d/1qOQnfR9kd9vUqDBqvI4wAwpjtUgg9_OB/view?usp=sharing

@mintar
Copy link
Member

mintar commented Oct 26, 2020

It isn't a public link, but I've requested access.

@MartinJensen37
Copy link

It isn't a public link, but I've requested access.

Oh sorry, it should be accessible now.

@matthias-mayr
Copy link
Contributor

We are running version 2.8.0.3. I checked our repo and we have no further changes that should be relevant for this issue.
When you have a solution, we can check it on our version as well.

@mintar
Copy link
Member

mintar commented Oct 27, 2020

@MartinJensen37 Thanks for the bagfile. There was indeed a small change in the MirMoveBaseAction between 2.4.0 and 2.8.3 (2e79d94), but I don't think that has anything to do with the problem.

Can you try using an action client instead of the move_base_simple/goal topic? For example, you can try running this script:

#!/usr/bin/env python

import rospy
from actionlib import SimpleActionClient, GoalStatus
from geometry_msgs.msg import PoseStamped
from move_base_msgs.msg import MoveBaseAction, MoveBaseGoal

def make_waypoints():
    waypoints = []

    p = PoseStamped()
    p.header.frame_id = 'map'
    p.pose.position.x = 41.39
    p.pose.position.y = 24.24
    p.pose.orientation.z = 0.7071067811865475  # sin(pi/4) (90 degrees yaw)
    p.pose.orientation.w = 0.7071067811865475
    waypoints.append(p)

    p = PoseStamped()
    p.header.frame_id = 'map'
    p.pose.position.x = 39.49
    p.pose.position.y = 24.37
    p.pose.orientation.z = 1.0
    p.pose.orientation.w = 0.0
    waypoints.append(p)

    return waypoints


def return_code_to_string(return_code):
    if return_code == GoalStatus.SUCCEEDED:
        return 'succeeded'
    elif return_code == GoalStatus.PREEMPTED:
        return 'preempted'
    elif return_code == GoalStatus.ABORTED:
        return 'aborted'
    else:
        return str(return_code)


def main():
    rospy.init_node('drive_to_waypoints')
    action_client = SimpleActionClient('move_base', MoveBaseAction)
    if not action_client.wait_for_server(rospy.Duration(30)):
        rospy.logerr('Timeout waiting for move_base action!')
        return
    rospy.loginfo('Connected to move_base action!')

    while True:
        for nr, waypoint in make_waypoints():
            rospy.loginfo("move to pose {}".format(nr))
            goal = MoveBaseGoal()
            goal.target_pose = waypoint
            ret = action_client.send_goal_and_wait(goal)
            rospy.loginfo('move_base result: %s', return_code_to_string(ret))

            if rospy.is_shutdown():
                action_client.cancel_all_goals()
                return


if __name__ == '__main__':
    try:
        main()
    except rospy.ROSInterruptException:
        pass

If that doesn't solve it, can you do the following, while using the mir_bridge as usual (i.e., don't set the ROS_MASTER_URI to the MiR PC, but to localhost instead)?

  • post the output of rosnode info /mir_bridge
  • do a rosbag record move_base/result move_base/feedback move_base/status move_base/goal move_base/cancel move_base_simple/goal -O mir_move_base2.bag while executing the script above or sending move_base_simple/goal messages, and upload the bagfile

@MartinJensen37
Copy link

MartinJensen37 commented Oct 27, 2020

Okay, I've tried the script and it gets stuck while giving the goal at action_client.send_goal_and_wait(goal). It just waits until I break the loop. I'm getting messages from the mir_bridge saying that a stream of messages is being sent to the topic move_base/feedback whenever I run the script. This is the content of the .bag file while running the script you sent.

path:        mir_move_base2.bag
version:     2.0
duration:    45.1s
start:       Oct 27 2020 14:14:25.90 (1603804465.90)
end:         Oct 27 2020 14:15:10.96 (1603804510.96)
size:        177.3 KB
messages:    678
compression: none [1/1 chunks]
types:       actionlib_msgs/GoalStatusArray        [8b2b82f13216d0a8ea88bd3af735e619]
             move_base_msgs/MoveBaseActionFeedback [7d1870ff6e0decea702b943b5af0b42e]
topics:      move_base/feedback   452 msgs    : move_base_msgs/MoveBaseActionFeedback
             move_base/status     226 msgs    : actionlib_msgs/GoalStatusArray

Here is the link to the .bag file where I run the script:https://drive.google.com/file/d/12ZSH0Ehqz4u_4-b2gKRqfxcUwhuw75jQ/view?usp=sharing
And here is the link to the .bag file where I try to send commands with move_base_simple/goal: https://drive.google.com/file/d/1Ja-o3IZy_RozYloIqfej6hK136Dpm4QR/view?usp=sharing
Using the move_base_simple/goal I could move the robot this time for some reason, however the movement does not correspond to the goal given, it mostly rotate with some slight linear movement. I suspect it has something to do with either delay or the transformations, but I'll try and report back when I've tested a bit more.

@MartinJensen37
Copy link

I just looked at the frames and it seems like a lot of them aren't present, I'm not sure why this is but here is the .pdf:
frames.pdf

@mintar
Copy link
Member

mintar commented Oct 27, 2020

What about the rosnode info /mir_bridge? While you're at it, please also post the output of rostopic info move_base/goal and rostopic info move_base/cancel.

It's very strange that there are no move_base/goal messages in the bagfile.

The robot is doing some very strange things. It always ends up in the same pose that it started from and reports "Goal reached", but that's not actually the goal that you sent.

The tf frames shouldn't have anything to do with the current problem (but they'll need adjustment, too). You could do the following to help:

  • comment out the robot_state_publisher from mir.launch
  • rosbag record --duration=10 /tf /tf_static

@MartinJensen37
Copy link

Here is the rosnode info /mir_bridge output:

--------------------------------------------------------------------------------
Node [/mir_bridge]
Publications: 
 * /LightCtrl/us_list [sensor_msgs/Range]
 * /MC/currents [sdc21x0/MotorCurrents]
 * /MissionController/CheckArea/visualization_marker [visualization_msgs/Marker]
 * /SickPLC/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
 * /SickPLC/parameter_updates [dynamic_reconfigure/Config]
 * /amcl_pose [geometry_msgs/PoseWithCovarianceStamped]
 * /b_raw_scan [sensor_msgs/LaserScan]
 * /b_scan [sensor_msgs/LaserScan]
 * /camera_floor/background [sensor_msgs/PointCloud2]
 * /camera_floor/depth/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
 * /camera_floor/depth/parameter_updates [dynamic_reconfigure/Config]
 * /camera_floor/depth/points [sensor_msgs/PointCloud2]
 * /camera_floor/filter/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
 * /camera_floor/filter/parameter_updates [dynamic_reconfigure/Config]
 * /camera_floor/floor [sensor_msgs/PointCloud2]
 * /camera_floor/obstacles [sensor_msgs/PointCloud2]
 * /camera_floor/transform/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
 * /camera_floor/transform/parameter_updates [dynamic_reconfigure/Config]
 * /check_area/polygon [geometry_msgs/PolygonStamped]
 * /diagnostics [diagnostic_msgs/DiagnosticArray]
 * /diagnostics_agg [diagnostic_msgs/DiagnosticArray]
 * /diagnostics_toplevel_state [diagnostic_msgs/DiagnosticStatus]
 * /f_raw_scan [sensor_msgs/LaserScan]
 * /f_scan [sensor_msgs/LaserScan]
 * /imu_data [sensor_msgs/Imu]
 * /laser_back/driver/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
 * /laser_back/driver/parameter_updates [dynamic_reconfigure/Config]
 * /laser_back/transform/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
 * /laser_back/transform/parameter_updates [dynamic_reconfigure/Config]
 * /laser_front/driver/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
 * /laser_front/driver/parameter_updates [dynamic_reconfigure/Config]
 * /laser_front/transform/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
 * /laser_front/transform/parameter_updates [dynamic_reconfigure/Config]
 * /map [nav_msgs/OccupancyGrid]
 * /map_metadata [nav_msgs/MapMetaData]
 * /mir_amcl/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
 * /mir_amcl/parameter_updates [dynamic_reconfigure/Config]
 * /mir_amcl/selected_points [sensor_msgs/PointCloud2]
 * /mir_log [rosgraph_msgs/Log]
 * /mir_serial_button [mir_msgs/Serial]
 * /mir_sound [std_msgs/String]
 * /mir_status [mir_msgs/MirStatus]
 * /mir_status_msg [std_msgs/String]
 * /mirwebapp/grid_map_metadata [mir_msgs/LocalMapStat]
 * /mirwebapp/laser_map_metadata [mir_msgs/LocalMapStat]
 * /move_base/cancel [actionlib_msgs/GoalID]
 * /move_base/feedback [move_base_msgs/MoveBaseActionFeedback]
 * /move_base/goal [move_base_msgs/MoveBaseActionGoal]
 * /move_base/result [move_base_msgs/MoveBaseActionResult]
 * /move_base/status [actionlib_msgs/GoalStatusArray]
 * /move_base_node/MIRPlannerROS/local_plan [nav_msgs/Path]
 * /move_base_node/SBPLLatticePlanner/plan [nav_msgs/Path]
 * /move_base_node/current_goal [geometry_msgs/PoseStamped]
 * /move_base_node/local_costmap/inflated_obstacles [nav_msgs/GridCells]
 * /move_base_node/local_costmap/obstacles [nav_msgs/GridCells]
 * /move_base_node/local_costmap/robot_footprint [geometry_msgs/PolygonStamped]
 * /odom_comb [nav_msgs/Odometry]
 * /odom_enc [nav_msgs/Odometry]
 * /robot_mode [mir_msgs/RobotMode]
 * /robot_pose [geometry_msgs/Pose]
 * /robot_state [mir_msgs/RobotState]
 * /rosout [rosgraph_msgs/Log]
 * /rosout_agg [rosgraph_msgs/Log]
 * /scan [sensor_msgs/LaserScan]
 * /scan_filter/visualization_marker [visualization_msgs/Marker]
 * /tf [tf/tfMessage]
 * /tf_static [tf/tfMessage]
 * /transform_footprint/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
 * /transform_footprint/parameter_updates [dynamic_reconfigure/Config]
 * /transform_imu/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
 * /transform_imu/parameter_updates [dynamic_reconfigure/Config]

Subscriptions: 
 * /cmd_vel [unknown type]
 * /initialpose [geometry_msgs/PoseWithCovarianceStamped]
 * /light_cmd [unknown type]
 * /mir_cmd [unknown type]
 * /move_base/cancel [actionlib_msgs/GoalID]
 * /move_base/feedback [move_base_msgs/MoveBaseActionFeedback]
 * /move_base/goal [move_base_msgs/MoveBaseActionGoal]
 * /move_base/result [move_base_msgs/MoveBaseActionResult]
 * /move_base/status [actionlib_msgs/GoalStatusArray]
 * /move_base_simple/goal [geometry_msgs/PoseStamped]

Services: 
 * /mir_bridge/get_loggers
 * /mir_bridge/set_logger_level


contacting node http://martin-ThinkPad-X250:33733/ ...
Pid: 5581
Connections:
 * topic: /amcl_pose
    * to: /rviz_1603869750241182348
    * direction: outbound
    * transport: TCPROS
 * topic: /f_scan
    * to: /f_rep117_laser_filter
    * direction: outbound
    * transport: TCPROS
 * topic: /move_base_node/SBPLLatticePlanner/plan
    * to: /rviz_1603869750241182348
    * direction: outbound
    * transport: TCPROS
 * topic: /tf_static
    * to: /rviz_1603869750241182348
    * direction: outbound
    * transport: TCPROS
 * topic: /move_base/cancel
    * to: /mir_bridge
    * direction: outbound
    * transport: TCPROS
 * topic: /move_base/status
    * to: /mir_bridge
    * direction: outbound
    * transport: TCPROS
 * topic: /move_base_node/MIRPlannerROS/local_plan
    * to: /rviz_1603869750241182348
    * direction: outbound
    * transport: TCPROS
 * topic: /b_scan
    * to: /b_rep117_laser_filter
    * direction: outbound
    * transport: TCPROS
 * topic: /b_scan
    * to: /rviz_1603869750241182348
    * direction: outbound
    * transport: TCPROS
 * topic: /map
    * to: /rviz_1603869750241182348
    * direction: outbound
    * transport: TCPROS
 * topic: /rosout
    * to: /rosout
    * direction: outbound
    * transport: TCPROS
 * topic: /tf
    * to: /rviz_1603869750241182348
    * direction: outbound
    * transport: TCPROS
 * topic: /move_base/result
    * to: /mir_bridge
    * direction: outbound
    * transport: TCPROS
 * topic: /move_base/feedback
    * to: /mir_bridge
    * direction: outbound
    * transport: TCPROS
 * topic: /MissionController/CheckArea/visualization_marker
    * to: /rviz_1603869750241182348
    * direction: outbound
    * transport: TCPROS
 * topic: /move_base_simple/goal
    * to: /rviz_1603869750241182348 (http://martin-ThinkPad-X250:41269/)
    * direction: inbound
    * transport: TCPROS
 * topic: /move_base/result
    * to: /mir_bridge (http://martin-ThinkPad-X250:33733/)
    * direction: inbound
    * transport: TCPROS
 * topic: /move_base/feedback
    * to: /mir_bridge (http://martin-ThinkPad-X250:33733/)
    * direction: inbound
    * transport: TCPROS
 * topic: /move_base/status
    * to: /mir_bridge (http://martin-ThinkPad-X250:33733/)
    * direction: inbound
    * transport: TCPROS
 * topic: /initialpose
    * to: /rviz_1603869750241182348 (http://martin-ThinkPad-X250:41269/)
    * direction: inbound
    * transport: TCPROS
 * topic: /move_base/cancel
    * to: /mir_bridge (http://martin-ThinkPad-X250:33733/)
    * direction: inbound
    * transport: TCPROS

And the info for the two topics:
move_base/goal

Type: move_base_msgs/MoveBaseActionGoal

Publishers: 
 * /mir_bridge (http://martin-ThinkPad-X250:33733/)

Subscribers: 
 * /mir_bridge (http://martin-ThinkPad-X250:33733/)

move_base/cancel

Type: actionlib_msgs/GoalID

Publishers: 
 * /mir_bridge (http://martin-ThinkPad-X250:33733/)

Subscribers: 
 * /mir_bridge (http://martin-ThinkPad-X250:33733/)

I might've connected to the robot wrong yesterday since I cannot reproduce the movement and all the frames are there now. So I tried running your script again with no luck unfortunately.

@mintar
Copy link
Member

mintar commented Oct 28, 2020

Hmm, that all looks normal. I don't think it's a problem with the MiR version, because the implementation of wait_for_server just checks if all publishers and subscribers are correctly connected. This happens before even sending anything to the MiR, so the MiR version should be irrelevant for the "Could not connect to'move_base' server" problem.

Perhaps the following helps. In all terminals, before starting any ROS nodes, run the following commands:

export ROS_IP=<your wifi IP>
export ROS_MASTER_URI=http://<your wifi IP>:11311

@MartinJensen37
Copy link

MartinJensen37 commented Oct 28, 2020

Now I exported my IP while connected to the WiFi of the robot.

export ROS_IP=192.168.12.xxx
export ROS_MASTER_URI=http://192.168.12.xxx:11311

I still get the message:

[WARN] [1603876191.260923]: Could not connect to 'move_base' server after two seconds. Dropping goal.
[WARN] [1603876191.263091]: Did you activate 'planner' in the MIR web interface?

When I run Rviz and give the first goal it doesn't come with the could not connect to move_base but the second time I do it, the warning above pops up.

@mintar
Copy link
Member

mintar commented Oct 28, 2020

I'm out of ideas, sorry.

@MartinJensen37
Copy link

No problem, I'll try a bit more with some adjustments and I'll write if anything works. Thanks for all the help!

@mintar
Copy link
Member

mintar commented Jun 11, 2021

I have just pushed a large update to the melodic and noetic branches. The branch melodic-2.8 is fully merged and no longer necessary. This issue is fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants