Git Product home page Git Product logo

traversability_estimation's People

Contributors

dependabot[bot] avatar romarcg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

traversability_estimation's Issues

mayavi version

hello,

Can I know which version of Mayavi you used with this repo? It is not stated here

Thank you,
Aaron

Validation Loss issue

While trying to train the model I am facing an issue related to the validation loss. The validation loss is supposed to decrease as the model is trained and when it overfits the loss starts increasing. But in my case the validation loss in the first 5 epoch is decreasing then after, it keeps on increasing and the validation accuracy is always around 0.80 since 1st epoch until the 50th.

I did not understand this behavior. Can someone explain

patch_size question

Hello,

I have a question regarding the patch size. For your example, your heightmaps are 513x513 and they represent a scene of approximately 10mx10m which means each pixel is approximately 0.02m.

Your robot is approximately 50cm by 47cm.

How did you arrive at a patch_size of 60 based on these conditions?

Please let me know.

Thank you.

visualization.py

Hello,

I tried running the visualization.py file and it seems there are missing files in your repo.

Below is the error message

Traceback (most recent call last):
  File "visualization.py", line 925, in <module>
    visualizeReachabilityonTerrain(terrain, "inputs/reachability/quarry_stride_14-0.95-(8, 20)-reach.yaml", offset, pixelsize, stride, (r_x,r_y,4.7,0.8,230), 0.2, out_name = "quarry_stride_14-0.95-(8, 20)-reach")
  File "visualization.py", line 616, in visualizeReachabilityonTerrain
    with open(reachability_file_yaml, 'r') as stream:
FileNotFoundError: [Errno 2] No such file or directory: 'inputs/reachability/quarry_stride_14-0.95-(8, 20)-reach.yaml'

I am not sure where I can find these yaml files.

Please let me know!

Thank you,
Aaron

Visualization with my own heightmap

Hello,

I am trying to run the visualization.py code with my own heightmap and minimal traversability map (generated by evaluation.py).

I hope to see both the orientation traversability map and minimal traversability map overlayed on top of the 3D environment. I know that this is possible as I was able to run your original code with the custom1 heightmap - I am not sure why I am not able to do so with my own heightmap.

My heightmap information:
width: 483 pixels
height: 480 pixels

I am currently receiving the following error message

Traceback (most recent call last):
  File "visualization.py", line 740, in <module>
    visualizeTerrain2(terrain_map,pixelsize,mask=mask, fig=fig, fontsize=0.4, robot_pose=(0,0,0,0.8,0) )
  File "visualization.py", line 306, in visualizeTerrain2
    s = mlab.mesh(x, y, terrain, scalars=mask) # We use a mesh, not a surf. Note: it's less efficient
  File "/home/usar/.virtualenvs/est/lib/python3.5/site-packages/mayavi/tools/helper_functions.py", line 37, in the_function
    return pipeline(*args, **kwargs)
  File "/home/usar/.virtualenvs/est/lib/python3.5/site-packages/mayavi/tools/helper_functions.py", line 82, in __call__
    output = self.__call_internal__(*args, **kwargs)
  File "/home/usar/.virtualenvs/est/lib/python3.5/site-packages/mayavi/tools/helper_functions.py", line 858, in __call_internal__
    self.source = self._source_function(*args, **kwargs)
  File "/home/usar/.virtualenvs/est/lib/python3.5/site-packages/mayavi/tools/sources.py", line 1288, in grid_source
    data_source.reset(x=x, y=y, z=z, scalars=scalars, mask=mask)
  File "/home/usar/.virtualenvs/est/lib/python3.5/site-packages/mayavi/tools/sources.py", line 693, in reset
    assert y.shape == z.shape, "Arrays y and z must have same shape."
AssertionError: Arrays y and z must have same shape.

Please let me know if you have any idea what this might be referring to?

Thank you

Edit 1

I have tried to use 'gridmap_elevation_1.png' provided in your repo, and it also faces the same error. I feel that this problem is the result of a non square heightmap image (my heightmap is also non square) ?

visualizing t_graph_cnn.gpickle

I am interested in visualizing the gpickle file (t_graph_cnn.gpickle) that is generated by def generate_traversability_graph_cnn(fitted, heightmap_png, edges, resize, stride, neighbours)

Could you provide some insight on what you mean by the following comments in evaluation.py? More specifically, what do you mean by use dot t_graph.dot -Tx11 -Kneato?

lines 318-332

    # to save the graph in pygraphviz for visualization
    nodes_positions_gviz = [ str(j)+','+str(-i)+'!' for i in range(0, hm_rows) for j in range(0,hm_cols)]
    #attr_positions = dict (zip(np.unique(full_data["patch"]),nodes_positions))
    attr_positions = dict (zip(np.unique(full_data["patch"]),nodes_positions_gviz))
    nx.set_node_attributes(G,"pos",attr_positions)
    ##nx.draw(G,nx.get_node_attributes(G,'pos'))
    #A=nx.drawing.nx_agraph.to_agraph(G)
    #A.write('t_graph_cnn.dot') 
    nx.write_gpickle(G, "t_graph_cnn.gpickle")
    
    # to visualize the graph in graphviz (and forcing to use our position for the nodes), use: 
    # dot t_graph.dot -Tx11 -Kneato
    
    # to read a dot file we shlould use:
    #G = nx.drawing.nx_agraph.read_dot('t_graph_cnn.dot')

evaluation.py issue

Hello,

I am attempting to run the evaluation.py file. Currently I am running in to the below error message.

Traceback (most recent call last):
  File "evaluation.py", line 482, in <module>
    temp_thm = test_fitted_model_full_map_stride_cnn(model,heightmap_png, patch_size, patch_resize, 0, stride)
  File "evaluation.py", line 164, in test_fitted_model_full_map_stride_cnn
    y_pred = fitted.predict(X)
  File "/home/usar/.virtualenvs/tran/lib/python3.5/site-packages/keras/engine/training.py", line 1149, in predict
    x, _, _ = self._standardize_user_data(x)
  File "/home/usar/.virtualenvs/tran/lib/python3.5/site-packages/keras/engine/training.py", line 751, in _standardize_user_data
    exception_prefix='input')
  File "/home/usar/.virtualenvs/tran/lib/python3.5/site-packages/keras/engine/training_utils.py", line 138, in standardize_input_data
    str(data_shape))
ValueError: Error when checking input: expected conv2d_1_input to have shape (60, 60, 1) but got array with shape (40, 40, 1)

Please let me know if you've seen something like this before?

docker simulation not working

Hello,

I wish to see the gazebo simulation as well as the csv files generated.

To do so, should I do:
docker pull romarcg/traversability-ros-ubuntu-gazebo
or
docker pull romarcg/traversability-ros-ubuntu-gazebo-pioneer
?

I am following the second link with intructions provided at this docker hub link.

To enter the docker container, I believe where you had:

nvidia-docker run -it --env="DISPLAY" --env="QT_X11_NO_MITSHM=1" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" -v /home/omar/Codes/traversability_docker/traversability-ros-ubuntu-gazebo-pioneer/volume:/volume --name="traversability_gazebo_task" traversability-ros-ubuntu-gazebo-pioneer

It should be the following instead:

nvidia-docker run -it --env="DISPLAY" --env="QT_X11_NO_MITSHM=1" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" -v /home/omar/Codes/traversability_docker/traversability-ros-ubuntu-gazebo-pioneer/volume:/volume --name="traversability_gazebo_task" romarcg/traversability-ros-ubuntu-gazebo-pioneer

Once I am in the docker container, I run the following:

roslaunch simulate_traversability_core launch_simulations.launch headless:=true gui:=true world_name:=custom1 dataset_type:=training number_tries:=50

Which gives me the following error message (I am also not seeing csv files generated)

[ INFO] [1561472689.311174152]: Finished loading Gazebo ROS API Plugin.
[Msg] Waiting for master.
[ INFO] [1561472689.311682550]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 172.17.0.2
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  30
  Current serial number in output stream:  31
process[gazebo_gui-3]: started with pid [1034]
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
  what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument
Aborted (core dumped)
[gazebo-2] process has died [pid 1015, exit code 134, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -r --verbose /root/catkin_ws/src/simulate_traversability/gazebo/models/heightmaps/custom1.world __name:=gazebo __log:=/root/.ros/log/fc033b98-9754-11e9-8070-0242ac110002/gazebo-2.log].
log file: /root/.ros/log/fc033b98-9754-11e9-8070-0242ac110002/gazebo-2*.log
[gazebo_gui-3] process has died [pid 1034, exit code 255, cmd /opt/ros/kinetic/lib/gazebo_ros/gzclient __name:=gazebo_gui __log:=/root/.ros/log/fc033b98-9754-11e9-8070-0242ac110002/gazebo_gui-3.log].
log file: /root/.ros/log/fc033b98-9754-11e9-8070-0242ac110002/gazebo_gui-3*.log
process[spawn_urdf-4]: started with pid [1115]
process[robot_state_publisher-5]: started with pid [1140]
ERROR: cannot launch node of type [simulate_traversability_core/run_simulation.py]: can't locate node [run_simulation.py] in package [simulate_traversability_core]

Could you please provide me some insight?

Thank you,
Aaron

dataset_generation_training issue

Hello,

I am attempting to run the dataset_generation_training.py file however i am running in to the below issue.

The error message reads:

Traceback (most recent call last):
  File "dataset_generation_training.py", line 594, in <module>
    callbacks=[custom_callbacks,keras.callbacks.TensorBoard(log_dir='./logs/'+time.strftime("%Y%m%d%H%M%S"), histogram_freq=0, write_graph=False, write_images=False)]
  File "/home/usar/.virtualenvs/tran/lib/python3.5/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
    return func(*args, **kwargs)
  File "/home/usar/.virtualenvs/tran/lib/python3.5/site-packages/keras/engine/training.py", line 1418, in fit_generator
    initial_epoch=initial_epoch)
  File "/home/usar/.virtualenvs/tran/lib/python3.5/site-packages/keras/engine/training_generator.py", line 251, in fit_generator
    callbacks.on_epoch_end(epoch, epoch_logs)
  File "/home/usar/.virtualenvs/tran/lib/python3.5/site-packages/keras/callbacks.py", line 79, in on_epoch_end
    callback.on_epoch_end(epoch, logs)
  File "dataset_generation_training.py", line 376, in on_epoch_end
    auc_epoch = sklearn.metrics.roc_auc_score(self.validation_data[1][0], y_pred)
  File "/home/usar/.virtualenvs/tran/lib/python3.5/site-packages/sklearn/metrics/ranking.py", line 355, in roc_auc_score
    sample_weight=sample_weight)
  File "/home/usar/.virtualenvs/tran/lib/python3.5/site-packages/sklearn/metrics/base.py", line 76, in _average_binary_score
    return binary_metric(y_true, y_score, sample_weight=sample_weight)
  File "/home/usar/.virtualenvs/tran/lib/python3.5/site-packages/sklearn/metrics/ranking.py", line 327, in _binary_roc_auc_score
    sample_weight=sample_weight)
  File "/home/usar/.virtualenvs/tran/lib/python3.5/site-packages/sklearn/metrics/ranking.py", line 622, in roc_curve
    y_true, y_score, pos_label=pos_label, sample_weight=sample_weight)
  File "/home/usar/.virtualenvs/tran/lib/python3.5/site-packages/sklearn/metrics/ranking.py", line 398, in _binary_clf_curve
    check_consistent_length(y_true, y_score, sample_weight)
  File "/home/usar/.virtualenvs/tran/lib/python3.5/site-packages/sklearn/utils/validation.py", line 205, in check_consistent_length
    " samples: %r" % [int(l) for l in lengths])
ValueError: Found input variables with inconsistent numbers of samples: [2, 10000]

The above error message seems to happen after one epoch. The following is a part of the error message that precede the above:

name: Quadro K2200 major: 5 minor: 0 memoryClockRate(GHz): 1.124
pciBusID: 0000:01:00.0
totalMemory: 3.94GiB freeMemory: 3.13GiB
2019-06-24 13:19:15.345383: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1511] Adding visible gpu devices: 0
2019-06-24 13:19:25.558085: I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-06-24 13:19:25.558164: I tensorflow/core/common_runtime/gpu/gpu_device.cc:988]      0 
2019-06-24 13:19:25.558208: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 0:   N 
2019-06-24 13:19:25.558586: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 2841 MB memory) -> physical GPU (device: 0, name: Quadro K2200, pci bus id: 0000:01:00.0, compute capability: 5.0)
Epoch 1/50
100/100 [==============================] - 122s 1s/step - loss: 0.5160 - acc: 0.7639 - val_loss: 0.4441 - val_acc: 0.8033

Please let me know if you've seen something like this before?

Thank you,
Aaron

traversability_graph 32 orientations?

Hello,

I noticed in your package that you can generate traversability maps up to 32 orientations.

Is it possible to do the same for generating the traversability graph? I noticed in your comment, you only stated either 4 or 8 directions. Is it possible to generate a traversability graph with 32 orientations as well?

Thank you

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.