Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all 119 articles
Browse latest View live

Problem at timing in communicating nodes?

$
0
0
Hello ROS community, I'm really newbie to ROS and what I am trying to do is to make an architecture in which there is a ***Simulator*** that compute his trajectory in every moment and a **Controller** that get the Simulator's position (x,y,theta) at every t and pass the params (v,w) in order to compute the next position in which Simulator has to go. To do this, Simulator publish his position in */stateTopic*, Controller is subscribed to /stateTopic so it gets the values, does the maths, and publish new params v,w in */paramsTopic*. What I want, and what I'm failing to do, is that Simulator gets the new params, compute the next position and publish it to /stateTopic. When I try to run this, it just doesn't work, nothing get publish on screen. Is a timing trouble? ------Simulator.py: import rospy import numpy as np import scipy as sp from comunicating_robots.msg import Position, Params from scipy.integrate import odeint import threading //using this to get a message object from paramsTopic class InfoGetter(object): def __init__(self): #event that will block until the info is received self._event = threading.Event() #attribute for storing the rx'd message self._msg = None def __call__(self, msg): #Uses __call__ so the object itself acts as the callback #save the data, trigger the event self._msg = msg self._event.set() def get_msg(self, timeout=None): """Blocks until the data is rx'd with optional timeout Returns the received message """ self._event.wait(timeout) return self._msg //using this to compute new position def newPosition(state, t, v, w): # unpack the state vector x = state[0] y = state[1] theta = state[2] # compute state derivatives xd = v*np.cos(theta) yd = v*np.sin(theta) thetad = w; #return the state derivatives return [xd, yd, thetad] def publishState(): rospy.init_node('simulator', anonymous=True) pub = rospy.Publisher('stateTopic', Position, queue_size=10) //using this to calculate new position state0 = [1.0, 1.0, 4.0] t = np.arange(0.0, 20.0, 0.01) state = odeint(newPosition, state0, t, args=(1,0)) rate = rospy.Rate(100) # 100hz #Get the info ig = InfoGetter() rospy.Subscriber('paramsTopic', Params, ig) rospy.spin() while not rospy.is_shutdown(): #creo e publico il messaggio msg = Position() msg.x = float(state[0][0]) msg.y = float(state[0][1]) msg.theta = float(state[0][2]) rospy.loginfo(msg) pub.publish(msg) rate.sleep() #getting params v,w from paramsTopic and evaluating new position #ig.get_msg() Blocks until message is received params = ig.get_msg() state = odeint(newPosition, state0, t, args=(str(params.v),str(params.w))) if __name__ == '__main__': try: publishState() except rospy.ROSInterruptException: pass ------Controller.py: import rospy from std_msgs.msg import String from comunicating_robots.msg import Position, Params def callback(data): rospy.loginfo('I heard '+str(data.x)+' '+str(data.y)+' '+str(data.theta)) #prendo x,y,z e li uso per calcolare i nuovi parametri publishParams(data.x, data.y, data.theta) def publishParams(x, y, theta): try: pub = rospy.Publisher('paramsTopic', Params, queue_size=10) rate = rospy.Rate(100) # 100hz msg = Params() msg.v = x msg.w = y-theta rospy.loginfo(msg) pub.publish(msg) except rospy.ROSInterruptException: pass def listener(): rospy.init_node('controller', anonymous=True) rospy.Subscriber('stateTopic', Position, callback) # spin() simply keeps python from exiting until this node is stopped rospy.spin() if __name__ == '__main__': listener() -----Position.msg: float64 x float64 y float64 theta -----Params.msg float64 v float64 w

Compiler error when trying to read message values

$
0
0
Here is my SWrite.msg file int16 id int16 pos int16 time Here is my CMakeLists.txt set (CMAKE_CXX_STANDARD 11) # %Tag(FULLTEXT)% cmake_minimum_required(VERSION 2.8.3) project(scs_servo_control) find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs genmsg) add_message_files(FILES SWrite.msg) generate_messages(DEPENDENCIES std_msgs) catkin_package() include_directories(include ${catkin_INCLUDE_DIRS} ) add_executable(scs_listener src/scs_listener.cpp) add_library(hardwareserial src/HardwareSerial.cpp) add_library(scservo src/SCServo.cpp) add_library(scsprotocol src/SCSProtocol.cpp) target_link_libraries(scs_listener ${catkin_LIBRARIES} hardwareserial scservo scsprotocol) add_dependencies(scs_listener beginner_tutorials_generate_messages_cpp) # %EndTag(FULLTEXT)% And here is my callback function: void chatterCallback(const std_msgs::String::ConstPtr& msg) { int id = msg->id; } I get compiler error with this: /home/serge/NetBeansProjects/ROS_beginner_tutorials/ros_ws/src/scs_servo_control/src/scs_listener.cpp: In function ‘void chatterCallback(const ConstPtr&)’: /home/serge/NetBeansProjects/ROS_beginner_tutorials/ros_ws/src/scs_servo_control/src/scs_listener.cpp:26:19: error: ‘const struct std_msgs::String_>’ has no member named ‘id’ int id = msg->id; ^ scs_servo_control/CMakeFiles/scs_listener.dir/build.make:62: recipe for target 'scs_servo_control/CMakeFiles/scs_listener.dir/src/scs_listener.cpp.o' failed It seems to be logical, because id (and also pos and time) is nowhere defined as member. But I read this https://answers.ros.org/question/54587/reading-message-once-subscribed-to-a-topic/ and this https://answers.ros.org/question/158976/how-to-read-a-value-from-a-ros-message/ and it confuses me. So how can I read values from a message in my callback function? What I missed?

Is there a package for topic diagnostics/message rate tracking and warning?

$
0
0
I am interested in having something like a package with general nodes that subscribe to topics and publish warnings when messages aren't being sent or are coming in at the wrong rates and that publishes warnings when this happens. I have a multi-robot system that suffers from a wide variety of often easily-mitigated errors related to things like hardware issues, wireless issues, etc. The biggest issue is generally detecting these errors. All of the typical failures involve streaming data such as heartbeats, odometry, and camera data. An easy way to track these streams in a separate node would be incredibly valuable. If someone has not already written a tool for this, I will likely write one myself.

Find node that logged an error?

$
0
0
As the title says, when a ROS error (or warning, or info) message is printed, how do I find out which node it came from?

topic question

$
0
0
ubuntu 16.04 ROS kinetic as per http://wiki.ros.org/ROS/Tutorials/UnderstandingTopics, i have listed my verbose details on topics in use rn: ~$ rostopic list -v Published topics: * /turtle1/color_sensor [turtlesim/Color] 1 publisher * /turtle1/cmd_vel [geometry_msgs/Twist] 1 publisher * /rosout [rosgraph_msgs/Log] 4 publishers * /rosout_agg [rosgraph_msgs/Log] 1 publisher * /turtle1/pose [turtlesim/Pose] 1 publisher Subscribed topics: * /turtle1/cmd_vel [geometry_msgs/Twist] 2 subscribers * /rosout [rosgraph_msgs/Log] 1 subscriber * /statistics [rosgraph_msgs/TopicStatistics] 1 subscriber then I tried `$ rostopic list -p` to see the list of publishers. /rosout /rosout_agg /turtle1/cmd_vel /turtle1/color_sensor /turtle1/pose 1. I did not expect to see the names of topics here because I did not understand that the publishers and subscribers themselves are actually the topics. I would have thought that the pubs and subs would just be nodes. Can someone explain why this is? 2. are all of these topics only topics or can a topic also be a node or a message? 3. just to check my understanding, is this right? a topic recieves a message from a node and gives it to a different node? does it sometimes give it to a different topic like could it be a recursive path through many things or like a function in algebra where you may have one message and one topic goes to more than one node ?

Importing custom messages from other packages in Python

$
0
0
Hi all, I've been on this for hours now and I can't figure it out. It seems as if not this forum or the tutorials have a solution for this simple question. I have downloaded the Vesc stack [here](https://github.com/mit-racecar/vesc), without the vesc_ackerman package. It all builds nicely with the addition of the serial library, and even connects to the device and publishes topics stated in vesc_msgs. You can rostopic echo them, you can rosmsg list them (VescState and VescStateStamped). Now, what I am trying to do is to use these messages in another package, so that I can manipulate it. I have a standard python node code, but it starts with: #import rospy, then #import VescState.msg (or from VescState import XXX) , and continues on (If any1 can point me on how to paste the code here without having only the first line as code format and everything else outside, plus hash-tags making the font huge, i'de love that...). I could go on but it doesnt really matter, because all I get when I try to run the code is: Traceback (most recent call last): File "/home/tim/catkin_ws/src/vesc_comm/src/vesc_comm.py", line 5, in from VescState.msg import * ImportError: No module named VescState.msg I have tried every conceivable way of doing this. i have tried to rename the message files, adding them as native messages to my package, including all the package.xml and cmakelists.txt additions just to make a sanity check. tried catkin_make install. none of it worked. I actually do not want to make these messages native anyway. what I do want is to get my vesc_comm.py script to recognize the VescState.msg file from the other package (again - the messages work with the vesc_driver node and are listed in rosmsg!). Why can I use every single message offered by ROS (std, geometry, pointcloud2...) but get the error stated above when I try and use a custom message?? my ROS is just not recognizing it. what am I doing wrong? Thanks in advance, Steve

Is it possible to send two topics, through throttle node syncronized?

$
0
0
Hello, is it possible to send these two topics to other node 1. /camera/rgb/image_color 2. /camera/depth/image_rect through the throttle node from topic_tools synchronized? If someone knows, it'll be very helpful. It is something like this: [link text](http://www.imageno.com/tuxioe6md9vipic.html) I put it in a link because I can not upload images

Message set for GNSS/INS ROS Driver (node) - Standardized

$
0
0
Hello, I am trying to develop a driver (node) for a commercial GNSS/INS unit. For that I think it is important NOT to use custom message sets, but rather standardized ones. I have found the following: - `sensor_msgs/NavSatFix.msg` for position (and GPS status) - `nav_msgs/Odometry.msg` which gives position (again) and twist (velocities) - `sensor_msgs/Imu.msg` IMU data - `GPSFix.msg` and `GPSStatus.msg` from [gps_common](http://wiki.ros.org/gps_common), which has a lot of types What would be the best design approach? Can any one with experience or not point me to the right direction? I think this would be important for people doing similar work as mine! Thanks!

Position, Velocity and Time

$
0
0
Is there a standard ROS message that can represent an object's x, y position along with its velocity at each position and time passed at the position?

Force subscriber to process messages in the right order

$
0
0
I have a single publisher that publishes messages at high frequency (1800 Hz), and a subscriber in another node. I realized that the messages are not always processed sequentially. I verified this by doing the following: in the callback function, I output a warning every time the seq number of the processed message is lower than the seq number of the message processed in the previous call of the callback. My question: is there a way to force a subscriber to process the incoming messages exactly in the order of the seq numbers in their header? (up to now I thought this would be the case by default with a single subscriber/publisher system, but apparently it isn't...) Any help is greatly appreciated!

Mavros move drone, no gps

$
0
0
Here am I again... I have been trying and trying but I can't seem to get the hang of it... I'm trying to move a drone to a certain location. I have the distances, which get updated whit a frequency of 30Hz, to the certain location in m in the x- and y-axis. With PID-controllers I convert the distances to velocities. Those velocities are not to move the drone in North, East direction but in forward, left, right direction. I'm trying to send those velocities to my drone using the `mavros/setpoint_velocity/cmd_vel` topic. But I'm not really sure if this is the correct one. Something extra: I can't use a gps. Does someone can help me with this? Thanks!

ROS2 ament overlay issue with messages

$
0
0
I'm working on adding array parameter support for ROS2, and am having trouble with ament. I've added new types and values [here](https://github.com/ayrton04/rcl_interfaces/blob/67ba403ccd3637292d2e8bb307b5d1377e33e654/rcl_interfaces/msg/ParameterType.msg) and [here](https://github.com/ayrton04/rcl_interfaces/blob/67ba403ccd3637292d2e8bb307b5d1377e33e654/rcl_interfaces/msg/ParameterValue.msg). I then sourced `/opt/ros/ardent/setup.bash`, and ran `ament build.` Eventually, this happened: [ 83%] Building C object CMakeFiles/rcl_interfaces__rosidl_typesupport_introspection_c__pyext.dir/rosidl_generator_py/rcl_interfaces/msg/_parameter_value_s.c.o /home/automatom/ros2/build/rcl_interfaces/rosidl_generator_py/rcl_interfaces/msg/_parameter_value_s.c: In function ‘rcl_interfaces_parameter_value__convert_from_py’: /home/automatom/ros2/build/rcl_interfaces/rosidl_generator_py/rcl_interfaces/msg/_parameter_value_s.c:111:61: error: ‘rcl_interfaces__msg__ParameterValue {aka struct rcl_interfaces__msg__ParameterValue}’ has no member named ‘byte_array_value’ if (!rosidl_generator_c__byte__Array__init(&(ros_message->byte_array_value), size)) This error repeats for all the new types. However, that structure *does* have the field in question. From `build/rcl_interfaces/rosidl_generator_c/rcl_interfaces/msg/parameter_value__struct.h`: /// Struct of message rcl_interfaces/ParameterValue typedef struct rcl_interfaces__msg__ParameterValue { uint8_t type; bool bool_value; int64_t integer_value; double double_value; rosidl_generator_c__String string_value; rosidl_generator_c__byte__Array byte_array_value; rosidl_generator_c__bool__Array bool_array_value; rosidl_generator_c__int64__Array integer_array_value; rosidl_generator_c__float64__Array double_array_value; rosidl_generator_c__String__Array string_array_value; } rcl_interfaces__msg__ParameterValue; This suggests that ament/cc are looking in the wrong location for the files in question. I manually went into `build/rcl_interfaces` and ran `make VERBOSE=1`, and found this for the first object that fails to build: /usr/lib/ccache/cc -Drcl_interfaces__rosidl_typesupport_c__pyext_EXPORTS -I/home/automatom/ros2/build/rcl_interfaces/rosidl_typesupport_c -I/opt/ros/ardent/include -I/home/automatom/ros2/build/rcl_interfaces/rosidl_generator_c -I/home/automatom/ros2/build/rcl_interfaces/rosidl_generator_py -I/usr/include/python3.5m -fPIC -Wall -Wextra -o CMakeFiles/rcl_interfaces__rosidl_typesupport_c__pyext.dir/rosidl_generator_py/rcl_interfaces/msg/_parameter_value_s.c.o -c /home/automatom/ros2/build/rcl_interfaces/rosidl_generator_py/rcl_interfaces/msg/_parameter_value_s.c Note that `-I/opt/ros/ardent/include` comes *before* `-I/home/automatom/ros2/build/rcl_interfaces/rosidl_generator_c`. If I swap them, and manually run the command, it builds successfully. I'm sure I'm missing something obvious, and I apologize if so, but what am I doing wrong? Am I missing a step for ament workspaces? I already tried sourcing `install/local_setup.bash` and building again, but to no avail. EDIT: providing steps to reproduce: mkdir -p ~/ament_test/src cd ~/ament_test/src git clone git@github.com:ayrton04/rcl_interfaces.git -b param-arrays cd .. source /opt/ros/ardent/setup.bash ament build

Import variables from a message

$
0
0
Hello, In my code I would like to get a variable from my message and use this in my main. Whenever I run this code "x" is said to be 0.00. This should be a different number. In my message I declare my variables as float32. I feel like I don't use `x = msg.x` the proper way. I know that my message is being send the right way. Because in a different code I was able to `ROS_INFO_STREAM(x)`. This showed that it receives the right x value. Could someone please look at my code and hopefully see where I make a mistake? #include #include #include #include #include using namespace std; class MoveRobot { public: double x; double y; double z; double roll; double pitch; double yaw; double a; void PublishCoordinatesCallback(const ur5_inf3480::Coor msg); }; void MoveRobot::PublishCoordinatesCallback(const ur5_inf3480::Coor msg) { x = msg.x; y = msg.y; z = msg.z; roll = msg.roll; pitch = msg.pitch; yaw = msg.yaw; a = msg.a; } int main(int argc, char **argv) { ros::init(argc, argv, "coordinates"); ros::NodeHandle nh; ros::Rate loop_rate(30); MoveRobot moverobot; ros::Subscriber sub = nh.subscribe("topic_subscribed", 1, &MoveRobot::PublishCoordinatesCallback, &moverobot); while (ros::ok()) { ROS_INFO("This is x: %.2f", moverobot.x); } loop_rate.sleep(); ros::spin(); return 0; } I hope I won't ask a question which has been asked already. I tried to search the forum and the internet first but I can't find a solution. Thank you for your answers!

Question re ACML_demo rosout messages

$
0
0
Hi All, I am fairly new to ROS, so forgive a rookie question. When I run amcl_demo.launch and view the output, I can see info such as "goal reached" and "got new plan", and I would like to publish these to a rostopic. Trouble is, I can't seem to find which file these info messages are originating from. I checked through the amcl_demo.launch file, the amcl.launch.xlm, etc. but can't find where the info logging is coming from. Any help would be appreciated.

map does not show up on RVIZ while using hector_slam

$
0
0
Hello everyone, i am using RPLIDAR A1 and hector_slam but so for there is no luck, RVIZ will start with nothing and no map in it. Here is the details: from this topic https://github.com/robopeak/rplidar_ros/blob/master/launch/rplidar.launch roslaunch rplidar rplidar.launch and i think it runs fine because i get this SUMMARY ======== PARAMETERS * /rosdistro: kinetic * /rosversion: 1.12.7 * /rplidarNode/angle_compensate: True * /rplidarNode/frame_id: laser * /rplidarNode/inverted: False * /rplidarNode/serial_baudrate: 115200 * /rplidarNode/serial_port: /dev/ttyUSB0 NODES / rplidarNode (rplidar_ros/rplidarNode) auto-starting new master process[master]: started with pid [2876] ROS_MASTER_URI=http://localhost:11311 setting /run_id to 4191033a-ff48-11e7-a91f-08002791f4c4 process[rosout-1]: started with pid [2889] started core service [/rosout] process[rplidarNode-2]: started with pid [2903] RPLIDAR running on ROS package rplidar_ros SDK Version: 1.5.7 RPLIDAR S/N: 4450FBF2C8E49CCFC6E49FF1BA82530D Firmware Ver: 1.20 Hardware Rev: 0 RPLidar health status : 0 then i run roslaunch hector_slam_launch tutorial.launch and i get SUMMARY ======== PARAMETERS * /hector_geotiff_node/draw_background_checkerboard: True * /hector_geotiff_node/draw_free_space_grid: True * /hector_geotiff_node/geotiff_save_period: 0.0 * /hector_geotiff_node/map_file_base_name: hector_slam_map * /hector_geotiff_node/map_file_path: /home/mohamed/cat... * /hector_geotiff_node/plugins: hector_geotiff_pl... * /hector_mapping/advertise_map_service: True * /hector_mapping/base_frame: base_link * /hector_mapping/laser_z_max_value: 1.0 * /hector_mapping/laser_z_min_value: -1.0 * /hector_mapping/map_frame: map * /hector_mapping/map_multi_res_levels: 2 * /hector_mapping/map_resolution: 0.05 * /hector_mapping/map_size: 2048 * /hector_mapping/map_start_x: 0.5 * /hector_mapping/map_start_y: 0.5 * /hector_mapping/map_update_angle_thresh: 0.06 * /hector_mapping/map_update_distance_thresh: 0.4 * /hector_mapping/odom_frame: nav * /hector_mapping/pub_map_odom_transform: True * /hector_mapping/scan_subscriber_queue_size: 5 * /hector_mapping/scan_topic: scan * /hector_mapping/tf_map_scanmatch_transform_frame_name: scanmatcher_frame * /hector_mapping/update_factor_free: 0.4 * /hector_mapping/update_factor_occupied: 0.9 * /hector_mapping/use_tf_pose_start_estimate: False * /hector_mapping/use_tf_scan_transformation: True * /hector_trajectory_server/source_frame_name: scanmatcher_frame * /hector_trajectory_server/target_frame_name: /map * /hector_trajectory_server/trajectory_publish_rate: 0.25 * /hector_trajectory_server/trajectory_update_rate: 4.0 * /rosdistro: kinetic * /rosversion: 1.12.7 * /use_sim_time: True NODES / hector_geotiff_node (hector_geotiff/geotiff_node) hector_mapping (hector_mapping/hector_mapping) hector_trajectory_server (hector_trajectory_server/hector_trajectory_server) map_nav_broadcaster (tf/static_transform_publisher) rviz (rviz/rviz) ROS_MASTER_URI=http://localhost:11311 core service [/rosout] found process[rviz-1]: started with pid [2961] process[hector_mapping-2]: started with pid [2962] process[map_nav_broadcaster-3]: started with pid [2963] process[hector_trajectory_server-4]: started with pid [2964] process[hector_geotiff_node-5]: started with pid [2995] [ INFO] [1516607154.164305614]: Waiting for tf transform data between frames /map and scanmatcher_frame to become available HectorSM map lvl 0: cellLength: 0.05 res x:2048 res y: 2048 HectorSM map lvl 1: cellLength: 0.1 res x:1024 res y: 1024 [INFO] [1516607154.473640201]: HectorSM p_base_frame_: base_link [ INFO] [1516607154.473985848]: HectorSM p_map_frame_: map [ INFO] [1516607154.474065501]: HectorSM p_odom_frame_: nav [ INFO] [1516607154.474138367]: HectorSM p_scan_topic_: scan [ INFO] [1516607154.474426569]: HectorSM p_use_tf_scan_transformation_: true [ INFO] [1516607154.474568112]: HectorSM p_pub_map_odom_transform_: true [ INFO] [1516607154.474655361]: HectorSM p_scan_subscriber_queue_size_: 5 [ INFO] [1516607154.474935408]: HectorSM p_map_pub_period_: 2.000000 [ INFO] [1516607154.475020520]: HectorSM p_update_factor_free_: 0.400000 [ INFO] [1516607154.475194516]: HectorSM p_update_factor_occupied_: 0.900000 [ INFO] [1516607154.475280399]: HectorSM p_map_update_distance_threshold_: 0.400000 [ INFO] [1516607154.475563451]: HectorSM p_map_update_angle_threshold_: 0.060000 [ INFO] [1516607154.475713128]: HectorSM p_laser_z_min_value_: -1.000000 [ INFO] [1516607154.475856377]: HectorSM p_laser_z_max_value_: 1.000000 [ INFO] [1516607154.551815279]: Successfully initialized hector_geotiff MapWriter plugin TrajectoryMapWriter. [ INFO] [1516607154.551977862]: Geotiff node started ---------- and RVIZ open up but with no map or anything, even though i am sure the RPLIDAR is publishing through /scan i tried to follow the solution presented here https://hackaday.io/project/7284-oscar-omni-service-cooperative-assistant-robot/log/26164-first-foray-into-ros but id did not solve my problem, any help will be appreciate it. I have been trying to figure it out for 3 days now

Is there a possibility in ROS to check that in the other machine messages publish in the topic without direct transfer of messages between the machines?

$
0
0
Hi, Is there a possibility in ROS to check that in the other machine messages publish in the topic without direct transfer of messages between the machines? I would like to transfer between machines only the information that the message was published in topic without transferring the exact things in it. I tried to use the «Message Event», but according to traffic of the router, the messages were transmitted completely.

Is there any way to parse C structures to ROS messages?

$
0
0
I'm looking for a way to convert a C structure to a ROS message. Does has any ideas how to do it? Does ROS provide some tools to do that? Or should I write parser on my own?

Cannot open rosbags with multiarrays.

$
0
0
- Distro: kinetic - OS: Ubuntu 16.04 - Program: Matlab and python Hello, I've encountered this problem in matlab R2018a (it works fine in R2017b) and in python. When trying to open a rosbag with any of these programs. I've attached the file I'm trying to open and the errors i get. (As i cannot attach files I've uploaded it here: https://we.tl/QvCoqIqhd1) ## Matlab R2018a ## >>rosbag('10.bag') No definition for MultiArrayLayout Message def: # Please look at the MultiArrayLayout message definition for # documentation on all multiarrays. MultiArrayLayout layout # specification of data layout float64[] data # array of data ## Python 2.7 ## >>> import rosbag >>> bag = rosbag.Bag('10.bag') >>> for topic,msg,t in bag.read_messages(): ... print(msg) File "", line 1, in (and another bunch of tracebacks) genmsg.msg_loader.MsgNotFound: Cannot locate message [MultiArrayLayout]: unknown package [std_msgs] on search path [{}] I've searched online and I can't find an answer.

Get information about topic message at runtime

$
0
0
I am trying to build an interface that universally bridges ROS topics to another system. I am importing the message type at runtime: importcom = ( # import type "from " + topic_class + ".msg import " + topic_type ) exec(importcom, globals()) This allows me to later subscribe to this topic dynamically at runtime. My question is now: **How can I gain insight in the structure of this message at runtime?** Ideally I need a json object that includes the types of all the parameters that i expect in a message. e.g.: { "angular" : { "x": float "y": float "linear" : { "x": float "y": float .... (or something like this)

How to collect messages from all topics and put them into a csv file?

$
0
0
Hello everyone! I have a .bag file with recorded messages from 4 different sensors (2xIMU, 2xINEMO), which have been worked simultaneously. I need to collect all messages from all sensors' topics and put them into one .csv file to do further research. So I want to get a table like this: (rosbagTimestamp, IMU_1_data, IMU_2_data, INEMO_1_data, INEMO_2_data) So how can I get such table with synchronically collected messages (data) from all topics? Edit: Would the solution provided by message_filters.ApproximateTimeSynchronizer solve the problem?
Viewing all 119 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>