Commit 8e738f3f authored by Nicolas Federico Furquez Morena's avatar Nicolas Federico Furquez Morena
Browse files

se renombra nuevamente

parent b01b9b57
cmake_minimum_required(VERSION 3.0.2)
project(localization_ros)
## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
message_generation
)
## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
# catkin_python_setup()
################################################
## Declare ROS messages, services and actions ##
################################################
## To declare and build messages, services or actions from within this
## package, follow these steps:
## * Let MSG_DEP_SET be the set of packages whose message types you use in
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
## * In the file package.xml:
## * add a build_depend tag for "message_generation"
## * add a build_depend and a exec_depend tag for each package in MSG_DEP_SET
## * If MSG_DEP_SET isn't empty the following dependency has been pulled in
## but can be declared for certainty nonetheless:
## * add a exec_depend tag for "message_runtime"
## * In this file (CMakeLists.txt):
## * add "message_generation" and every package in MSG_DEP_SET to
## find_package(catkin REQUIRED COMPONENTS ...)
## * add "message_runtime" and every package in MSG_DEP_SET to
## catkin_package(CATKIN_DEPENDS ...)
## * uncomment the add_*_files sections below as needed
## and list every .msg/.srv/.action file to be processed
## * uncomment the generate_messages entry below
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
## Generate messages in the 'msg' folder
add_message_files(
FILES
Distance.msg
)
## Generate services in the 'srv' folder
# add_service_files(
# FILES
# Service1.srv
# Service2.srv
# )
## Generate actions in the 'action' folder
# add_action_files(
# FILES
# Action1.action
# Action2.action
# )
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs
)
################################################
## Declare ROS dynamic reconfigure parameters ##
################################################
## To declare and build dynamic reconfigure parameters within this
## package, follow these steps:
## * In the file package.xml:
## * add a build_depend and a exec_depend tag for "dynamic_reconfigure"
## * In this file (CMakeLists.txt):
## * add "dynamic_reconfigure" to
## find_package(catkin REQUIRED COMPONENTS ...)
## * uncomment the "generate_dynamic_reconfigure_options" section below
## and list every .cfg file to be processed
## Generate dynamic reconfigure parameters in the 'cfg' folder
# generate_dynamic_reconfigure_options(
# cfg/DynReconf1.cfg
# cfg/DynReconf2.cfg
# )
###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if your package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES localization_ros
CATKIN_DEPENDS roscpp rospy std_msgs message_runtime
# DEPENDS system_lib
)
###########
## Build ##
###########
## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
# include
${catkin_INCLUDE_DIRS}
)
## Declare a C++ library
# add_library(${PROJECT_NAME}
# src/${PROJECT_NAME}/localization_ros.cpp
# )
## Add cmake target dependencies of the library
## as an example, code may need to be generated before libraries
## either from message generation or dynamic reconfigure
# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
## Declare a C++ executable
## With catkin_make all packages are built within a single CMake context
## The recommended prefix ensures that target names across packages don't collide
# add_executable(${PROJECT_NAME}_node src/localization_node.cpp)
## Rename C++ executable without prefix
## The above recommended prefix causes long target names, the following renames the
## target back to the shorter version for ease of user use
## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node"
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")
## Add cmake target dependencies of the executable
## same as for the library above
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
## Specify libraries to link a library or executable target against
# target_link_libraries(${PROJECT_NAME}_node
# ${catkin_LIBRARIES}
# )
#############
## Install ##
#############
# all install targets should use catkin DESTINATION variables
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
## Mark executable scripts (Python etc.) for installation
## in contrast to setup.py, you can choose the destination
# catkin_install_python(PROGRAMS
# scripts/my_python_script
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
## Mark executables for installation
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_executables.html
# install(TARGETS ${PROJECT_NAME}_node
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
## Mark libraries for installation
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html
# install(TARGETS ${PROJECT_NAME}
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
# )
## Mark cpp header files for installation
# install(DIRECTORY include/${PROJECT_NAME}/
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
# FILES_MATCHING PATTERN "*.h"
# PATTERN ".svn" EXCLUDE
# )
## Mark other files for installation (e.g. launch and bag files, etc.)
# install(FILES
# # myfile1
# # myfile2
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
# )
#############
## Testing ##
#############
## Add gtest based cpp test target and link libraries
# catkin_add_gtest(${PROJECT_NAME}-test test/test_localization.cpp)
# if(TARGET ${PROJECT_NAME}-test)
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
# endif()
## Add folders to be run by python nosetests
# catkin_add_nosetests(test)
find_package(catkin REQUIRED COMPONENTS roslaunch)
roslaunch_add_file_check(launch)
<launch>
<arg name="carpeta" value="/home/nico/Proyecto/RepoFinal/Investigacion/bags_distancias/" />
<node pkg="rosbag" type="play" name="player3" args="--wait-for-subscribers -q --clock --skip-empty=1 $(arg carpeta)/pto_19.bag" output="screen" />
<node pkg="localization_ros" required="true" type="comprobacion.py" name="salida" output="screen" />
</launch>
\ No newline at end of file
<launch>
<arg name="anchors_csv" doc="/home/nico/Proyecto/RepoFinal/Investigacion/error_localizacion/posiciones1.csv"/>
<!-- Output to screen -->
<!-- <node name="anchors_static_tf_publisher" pkg="localization_ros" type="anchors_static_tf_publisher.py" args="$(arg anchors_csv)" respawn="true" output="screen" /> -->
<!-- Output to log -->
<node name="anchors_static_tf_publisher" pkg="localization_ros" type="anchors_static_tf_publisher.py" args="/home/nico/Proyecto/RepoFinal/Investigacion/pruebas.csv" respawn="true" />
<!-- Original -->
<!-- <node name="anchors" pkg="localization_ros" type="anchors_static_tf_publisher.py" args="/root/catkin_ws/src/localization_ros/scripts/anchors.csv" respawn="true"/> -->
</launch>
<launch>
<node name="reader" pkg="localization_ros" type="reader.py" output="screen">
<rosparam>
#0 sin filtro, 1 Afa beta, 2 Kalman, 3 Promedio
filter: 0
kalmanr: 1.5
kalmanq: 1000
kalmandt: 0.3
kalmansv: 0.5
#offset, diferencia entre la medida real y la calculada default -18.5
offset: 0.0
alpha: 0.5
beta: 0.5
#cantidad de valores a recordar
filterma: 4
anchors_ids: {
anchor1: 1,
anchor2: 2,
anchor3: 3,
anchor4: 14,
anchor5: 18
}
anchor_pos: {
anchor1: [0.869,9.077,1.649],
anchor2: [-3.692,8.882,1.624] ,
anchor3: [3.291,7.809,1.691] ,
anchor4: [3.28,-0.577, 1.731],
anchor5: [-3.701,-0.824,1.493]
}
#es la altura del tag, asumimos que el tag esta siempre a la misma altura
tagheight:1.725
topic_debug:debug_position
</rosparam>
</node>
<node name="roserial" pkg="rosserial_python" type="serial_node.py" args="_port:=/dev/ttyACM0 _baud:=115200" respawn="true"/>
</launch>
\ No newline at end of file
<launch>
<arg name="anchors_csv" default="/root/catkin_ws/src/localization_ros/scripts/puntos.csv" doc="ruta arvhico CSV con posiciones de los anchors" />
<!-- Output to screen -->
<node name="anchors_static_tf_publisher" pkg="localization_ros" type="anchors_static_tf_publisher.py" args="$(arg anchors_csv)" respawn="true" output="screen" />
<!-- Output to log -->
<!--<node name="anchors_static_tf_publisher" pkg="localization_ros" type="anchors_static_tf_publisher.py" args="/home/nico/Proyecto/RepoFinal/Investigacion/error_localizacion/posiciones1.csv" respawn="true" />-->
<!-- Original -->
<!-- <node name="anchors" pkg="localization_ros" type="anchors_static_tf_publisher.py" args="/root/catkin_ws/src/localization_ros/scripts/anchors.csv" respawn="true"/> -->
</launch>
<launch>
<node name="reader" pkg="localization_ros" type="reader.py" output="screen">
<rosparam>
#0 sin filtro, 1 Alfa beta, 2 Kalman, 3 Promedio
filter: 0
kalmanr: 1.5
kalmanq: 1000
kalmandt: 0.3
kalmansv: 0.5
#offset, diferencia entre la medida real y la calculada default -18.5
offset: 0.0
alpha: 0.5
beta: 0.5
#cantidad de valores a recordar
filterma: 4
anchors_ids: {
# anchor1: 5,
anchor2: 10,
anchor3: 1,
# anchor4: 16,
# anchor5: 17,
# anchor6: 13,
anchor7: 2,
anchor8: 18,
# anchor9: 7,
# anchor10: 4,
# anchor11: 3,
# anchor12: 14,
# anchor13: 19,
}
anchor_pos: {
#anchor1: [3.276,5.405,1.207],
anchor2: [-3.688,2.904,1.749],
anchor3: [0.869,9.077,1.649],
#anchor4: [3.083,-5.714,1.709],
#anchor5: [-3.697,-3.163,1.725],
#anchor6: [3.282,1.457,1.594],
anchor7: [-3.692,8.882,1.624],
anchor8: [-3.701,-0.824,1.493],
#anchor9: [3.295,2.778,1.803],
#anchor10: [3.274,5.404,1.732],
#anchor11: [3.291,7.809,1.691],
#anchor12: [3.28,-0.577,1.731],
#anchor13: [-3.696,0.378,1.983],
}
debug: True
#es la altura del tag, asumimos que el tag esta siempre a la misma altura
tagheight = 1.725
</rosparam>
</node>
<arg name="carpeta" value="/home/nico/Proyecto/RepoFinal/Investigacion/bags_distancias/" />
<node pkg="rosbag" type="play" name="player1" output="screen" args="--wait-for-subscribers -q --clock $(arg carpeta)/pto_10.bag"/>
<node pkg="rosbag" type="play" name="player2" output="screen" args="--wait-for-subscribers -q --clock $(arg carpeta)/pto_2.bag"/>
<node pkg="rosbag" type="play" name="player3" output="screen" args="--wait-for-subscribers -q --clock $(arg carpeta)/pto_1.bag"/>
</launch>
\ No newline at end of file
<launch>
<node name="reader" pkg="localization_ros" type="reader.py" output="screen">
<rosparam>
filter: 0
kalmanr: 1.5
kalmanq: 1000
kalmandt: 0.3
kalmansv: 4
#offset, diferencia entre la medida real y la calculada default -18.5
offset: 0.0
alpha: 0.5
beta: 0.5
#filtro de valores a recordar
filterma: 1
anchors_ids: {
anchor1: 1,
anchor2: 4,
anchor3: 3,
}
anchor_pos: {
anchor1: [0.0,0.0,0.0],
anchor2: [1.8,0.0,0.0],
anchor3: [0.0,2.3,0.0],
}
#es la altura del tag, asumimos que el tag esta siempre a la misma altura
tagheight = 1.725
</rosparam>
</node>
<!-- <node name="roserial" pkg="rosserial_python" type="serial_node.py" args="_port:=/dev/ttyACM0 _baud:=115200" respawn="true"/> -->
<!-- <node name="visualizar" pkg="rviz" type="rviz" respawn="true" args="-d $(find localization_ros)/rviz/nodos.rviz"/> -->
<!-- <node name="fixed_frame" pkg="localization_ros" type="fixed_frame.py" respawn="true" args="-d $(find localization_ros)/rviz/nodos.rviz"/> -->
<node pkg="rosbag" type="play" name="player1" output="screen" args=" /home/nico/run/*"/>
<!-- <node pkg="rosbag" type="play" name="player3" output="screen" args=" /home/nico/rosserial-in-3.bag"/> -->
<!-- puede usarse rosbag play *.bag o rosbag a.bag b.bag -->
</launch>
\ No newline at end of file
<launch>
<node name="reader" pkg="localization_ros" type="calibrate.py" output="screen">
</node>
<node name="roserial" pkg="rosserial_python" type="serial_node.py" args="_port:=/dev/ttyACM0 _baud:=115200" respawn="true"/>
</launch>
\ No newline at end of file
<launch>
<node pkg="rosbag" type="filter" name="filter_3" output="screen" args="/home/nico/rosserial-in.bag /home/nico/rosserial-in-3.bag 'm.anchor == 3'"/>
<!-- <node pkg="rosbag" type="play" name="player" output="screen" args="clock /home/nico/rosserial-in.bag"/>
<node pkg="rosbag" type="play" name="player" output="screen" args="clock /home/nico/rosserial-in.bag"/>
<node pkg="rosbag" type="play" name="player" output="screen" args="clock /home/nico/rosserial-in.bag"/> -->
</launch>
\ No newline at end of file
<!-- lanch para ejecutar los 4 filtros a la vez y poder generar la data de la
diferencia entre la posicion calculada y la posicion estimada por el sistema -->
<launch>
<node name="reader_0" pkg="localization_ros" type="reader.py">
<rosparam>
#0 sin filtro, 1 Afa beta, 2 Kalman, 3 Promedio
filter: 0
kalmanr: 1.5
kalmanq: 1000
kalmandt: 0.3
kalmansv: 0.5
#offset, diferencia entre la medida real y la calculada default -18.5
offset: 0.0
alpha: 0.5
beta: 0.5
#cantidad de valores a recordar
filterma: 4
anchors_ids: {
anchor1: 1,
anchor2: 2,
anchor3: 3,
anchor4: 14,
anchor5: 18,
#anchor6: 6,
#anchor7: 7,
#anchor8: 8,
#anchor9: 9,
#anchor10: 10,
#anchor11: 11,
#anchor12: 12,
#anchor13: 13,
#anchor14: 14,
#anchor18: 18,
}
anchor_pos: {
anchor1: [0.869,9.077,1.649], #1
anchor2: [-3.692,8.882,1.624], #2
anchor3: [3.291,7.809,1.691], #3
#anchor4: [3.274,5.404,1.732], #4
#anchor5: [3.276,5.405,1.207], #5
#anchor6: [-0.295,5.717,2.152], #6
#anchor7: [3.295,2.778,1.803], #7
#anchor8: [0.091,4.091,1.975], #8
#anchor9: [-0.127,1.703,1.985], #9
#anchor10: [-3.688,2.904,1.749], #10
#anchor11: [-2.331,6.625,2.303], #11
#anchor12: [2.089,1.638,1.987], #12
#anchor13: [3.282,1.457,1.594], #13
anchor4: [3.28,-0.827,1.731], #14
#anchor15: [0.389,-3.331,1.779], #15
#anchor16: [3.083,-5.714,1.709], #16
#anchor17: [-3.697,-3.163,1.725], #17
anchor5: [-3.701,-0.824,1.493], #18
#anchor19: [-3.696,0.378,1.983], #19
#anchor20: [1.384,-0.809,2.301], #20
}
#es la altura del tag, asumimos que el tag esta siempre a la misma altura
tagheight: 1.725
topic_debug: debug_position_0
debug: true
</rosparam>
</node>
<node name="position_processor_0" pkg="localization_ros" type="position-processor.py" output="screen">
<rosparam>
tag_real_pos: [0.091, 4.091, 1.725]
input_topic: debug_position_0
output_file: /root/pg/Investigacion/0los_5nlos_filtro_0.csv
cant_medidas: 1020
</rosparam>
</node>
<node name="reader_1" pkg="localization_ros" type="reader.py" >
<rosparam>
#0 sin filtro, 1 Afa beta, 2 Kalman, 3 Promedio
filter: 1
kalmanr: 1.5
kalmanq: 1000
kalmandt: 0.3
kalmansv: 0.5
#offset, diferencia entre la medida real y la calculada default -18.5
offset: 0.0
alpha: 0.5
beta: 0.5
#cantidad de valores a recordar
filterma: 4
anchors_ids: {
anchor1: 1,
anchor2: 2,
anchor3: 3,
anchor4: 14,
anchor5: 18,
#anchor6: 6,
#anchor7: 7,
#anchor8: 8,
#anchor9: 9,
#anchor10: 10,
#anchor11: 11,
#anchor12: 12,
#anchor13: 13,
#anchor14: 14,
#anchor18: 18,
}
anchor_pos: {
anchor1: [0.869,9.077,1.649], #1
anchor2: [-3.692,8.882,1.624], #2
anchor3: [3.291,7.809,1.691], #3
#anchor4: [3.274,5.404,1.732], #4
#anchor5: [3.276,5.405,1.207], #5
#anchor6: [-0.295,5.717,2.152], #6
#anchor7: [3.295,2.778,1.803], #7
#anchor8: [0.091,4.091,1.975], #8
#anchor9: [-0.127,1.703,1.985], #9
#anchor10: [-3.688,2.904,1.749], #10
#anchor11: [-2.331,6.625,2.303], #11
#anchor12: [2.089,1.638,1.987], #12
#anchor13: [3.282,1.457,1.594], #13
anchor4: [3.28,-0.827,1.731], #14
#anchor15: [0.389,-3.331,1.779], #15
#anchor16: [3.083,-5.714,1.709], #16
#anchor17: [-3.697,-3.163,1.725], #17
anchor5: [-3.701,-0.824,1.493], #18
#anchor19: [-3.696,0.378,1.983], #19
#anchor20: [1.384,-0.809,2.301], #20
}
#es la altura del tag, asumimos que el tag esta siempre a la misma altura
tagheight: 1.725
topic_debug: debug_position_1
debug: true
</rosparam>
</node>
<node name="position_processor_1" pkg="localization_ros" type="position-processor.py" output="screen">
<rosparam>
tag_real_pos: [0.091, 4.091, 1.725]
input_topic: debug_position_1
output_file: /root/pg/Investigacion/0los_5nlos_filtro_1.csv
cant_medidas: 1020
</rosparam>
</node>
<node name="reader_2" pkg="localization_ros" type="reader.py" >
<rosparam>
#0 sin filtro, 1 Afa beta, 2 Kalman, 3 Promedio
filter: 2
kalmanr: 1.5
kalmanq: 1000
kalmandt: 0.3
kalmansv: 0.5
#offset, diferencia entre la medida real y la calculada default -18.5
offset: 0.0
alpha: 0.5
beta: 0.5
#cantidad de valores a recordar
filterma: 4
anchors_ids: {
anchor1: 1,
anchor2: 2,
anchor3: 3,
anchor4: 14,
anchor5: 18,
#anchor6: 6,
#anchor7: 7,
#anchor8: 8,
#anchor9: 9,
#anchor10: 10,
#anchor11: 11,
#anchor12: 12,
#anchor13: 13,
#anchor14: 14,
#anchor18: 18,
}
anchor_pos: {
anchor1: [0.869,9.077,1.649], #1
anchor2: [-3.692,8.882,1.624], #2
anchor3: [3.291,7.809,1.691], #3
#anchor4: [3.274,5.404,1.732], #4
#anchor5: [3.276,5.405,1.207], #5
#anchor6: [-0.295,5.717,2.152], #6
#anchor7: [3.295,2.778,1.803], #7
#anchor8: [0.091,4.091,1.975], #8
#anchor9: [-0.127,1.703,1.985], #9
#anchor10: [-3.688,2.904,1.749], #10
#anchor11: [-2.331,6.625,2.303], #11
#anchor12: [2.089,1.638,1.987], #12
#anchor13: [3.282,1.457,1.594], #13
anchor4: [3.28,-0.827,1.731], #14
#anchor15: [0.389,-3.331,1.779], #15
#anchor16: [3.083,-5.714,1.709], #16
#anchor17: [-3.697,-3.163,1.725], #17
anchor5: [-3.701,-0.824,1.493], #18
#anchor19: [-3.696,0.378,1.983], #19
#anchor20: [1.384,-0.809,2.301], #20
}
#es la altura del tag, asumimos que el tag esta siempre a la misma altura
tagheight: 1.725
topic_debug: debug_position_2
debug: true
</rosparam>
</node>
<node name="position_processor_2" pkg="localization_ros" type="position-processor.py" output="screen">
<rosparam>