Giter Club home page Giter Club logo

Comments (8)

SteveMacenski avatar SteveMacenski commented on July 28, 2024

It's just a simple wrapper, if you look at the map saver, its just calling the bash for map saver. Did you check your .ros? If you don't specify a full path they'll get dumped there. If you add / but isnt a full path, then it will also fail as would it with calling from the terminal. If you do ./xyz I dont know what would happen, might be .ros, might be where you called the node from, that's up to the map server handling I can't guess. Also I'm 90% sure you shouldn't be specifying file extensions.

I'd need more information about what you're trying to do. What do your logs say? Whats your computer/CPU/ROS version/etc

from slam_toolbox.

ubtjoe avatar ubtjoe commented on July 28, 2024

Master node: docker-compose running 4 docker images concurrently:

  • master running roscore (ros:kinetic-ros-core image)
  • sensor processing container (image based on ros:kinetic-ros-base) for publishing sensor data and transforms
  • turtlebot container (image based on ros:kinetic-ros-base) for publishing odometry and transforms
  • slam container (image based on ros:melodic-ros-base)

Host(slave) node: same as slam container above

I am able to communicate with the Master node from the Host node (verified that rostopic echo/list displays desired data).

Regarding your question about logs data: See output from Host node below:

ros@joeslaptop:~/.ros/log$ rosservice call /sync_slam_toolbox_node/save_map "name:
  data: 'maptest'" 

ros@joeslaptop:~/.ros/log$ cat rosservice_
rosservice_570_1570126106524.log  rosservice_604_1570126368162.log
rosservice_581_1570126209337.log  rosservice_612_1570126398903.log
rosservice_595_1570126345634.log  
ros@joeslaptop:~/.ros/log$ cat rosservice_612_1570126398903.log 
[rospy.client][INFO] 2019-10-03 11:13:18,922: init_node, name[/rosservice_612_1570126398903], pid[612]
[xmlrpc][INFO] 2019-10-03 11:13:18,922: XML-RPC server binding to 0.0.0.0:0
[xmlrpc][INFO] 2019-10-03 11:13:18,922: Started XML-RPC server [http://192.168.0.139:38783/]
[rospy.init][INFO] 2019-10-03 11:13:18,923: ROS Slave URI: [http://192.168.0.139:38783/]
[rospy.impl.masterslave][INFO] 2019-10-03 11:13:18,923: _ready: http://192.168.0.139:38783/
[rospy.registration][INFO] 2019-10-03 11:13:18,923: Registering with master node http://192.168.0.178:11311
[xmlrpc][INFO] 2019-10-03 11:13:18,923: xml rpc node: starting XML-RPC server
[rospy.init][INFO] 2019-10-03 11:13:19,023: registered with master
[rospy.rosout][INFO] 2019-10-03 11:13:19,024: initializing /rosout core topic
[rospy.rosout][INFO] 2019-10-03 11:13:19,105: connected to core topic /rosout
[rospy.simtime][INFO] 2019-10-03 11:13:19,132: /use_sim_time is not set, will not subscribe to simulated time [/clock] topic
[rospy.internal][INFO] 2019-10-03 11:13:19,339: topic[/rosout] adding connection to [/rosout], count 0
[rospy.core][INFO] 2019-10-03 11:13:21,236: signal_shutdown [atexit]
[rospy.internal][INFO] 2019-10-03 11:13:21,268: topic[/rosout] removing connection to /rosout
[rospy.impl.masterslave][INFO] 2019-10-03 11:13:21,269: atexit

The signal_shutdown line appears ominous... What is the log output supposed to look like?

from slam_toolbox.

SteveMacenski avatar SteveMacenski commented on July 28, 2024

This is client side code, this isnt going to tell you anything. Whats the actual node saying?

Also if you’re on another machine calling it, are you certain the request is going through? Again looking at server logs.

You’re also mixing melodic and kinetic, that’s not a good sign to start with. Try using only kinetic.

If you’re on multiple machines also validating youre not overloading the network is good.

from slam_toolbox.

ubtjoe avatar ubtjoe commented on July 28, 2024

Issue resolved... Closing now.

The maps are being saved on the server in ~/.ros. Naively, I thought that the service call would save the map locally on the caller's, in this case the client's, side. I will just save the map via map_server directly.

FWIW: It would be a nice feature to be able to use the rviz plugin and services from the client-side, as I don't want to run anything graphical on my robot pc, whether through vnc or other.

Regarding, your comment about mixing distros: What's wrong with this? I am using docker and the individual containers are isolated. Any exposure is only over http, right? Has roscore changed that much between kinetic and melodic? A couple days of testing and I've not had any issues between the Toolbox and my other ros stack; the whole setup runs like a champ.

from slam_toolbox.

SteveMacenski avatar SteveMacenski commented on July 28, 2024

Its bad because there’s no promise that the message hashes are the same between versions, or that the core ros libraries are compatible. If you’re seeing it work then you’re probably fine, but I wouldn’t expect that to work in the general case. I wouldn’t expect the errors to manifest randomly, so if you can use all the services/topics without an issue you’re in the clear.

If you’re trying to save maps locally, calling the service to the slam toolbox server doesn’t really make sense, you need to run map saver on your second machine. Only way the toolbox could do it is if you also provided ssh keys and info for the server to scp the data over, which seems over the top.

The server is being called to perform a remote action, I dont think its in scope to call a server to perform a local action. But glad you found it!

from slam_toolbox.

Mohit-Ak avatar Mohit-Ak commented on July 28, 2024

@SteveMacenski
Can you please post the command for ROS2 usage as well. I tried the following and they did not work.

  • ros2 service call /save_map slam_toolbox/srv/SaveMap "name: data: './map.pgm'"
  in "<unicode string>", line 1, column 11:
    name: data: './map.pgm'
  • ros2 service call /save_map slam_toolbox/srv/SaveMap "name: ./map.pgm"
    Failed to populate field: Value './map.pgm' is expected to be a dictionary but is a str
  • ros2 service call /save_map slam_toolbox/srv/SaveMap "{'name':"knox"}"
    Failed to populate field: Value 'knox' is expected to be a dictionary but is a str

from slam_toolbox.

Mohit-Ak avatar Mohit-Ak commented on July 28, 2024

I actually solved it. There is a hidden newline character.

#Need to copy with newline:
ros2 service call /save_map slam_toolbox/srv/SaveMap "name:
  data: 'map.pgm'"


waiting for service to become available...
requester: making request: slam_toolbox.srv.SaveMap_Request(name=std_msgs.msg.String(data='./map.pgm'))

response:
slam_toolbox.srv.SaveMap_Response()

But strangely, I don't see any map getting saved.

from slam_toolbox.

akela1101 avatar akela1101 commented on July 28, 2024

One liner would be:

rosservice call /slam_toolbox/save_map "name: {data: 'your_map_name'}"

from slam_toolbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.