lardemua / atlascar2

Core packages for the LAR DEMUA Atlas Project
6 stars 1 forks source link

Publish can messages to ROS and process their data #43

Closed manuelgitgomes closed 2 years ago

manuelgitgomes commented 2 years ago

In order to combat inaccurate odometry values derivated from inaccurate odometry parameters, the recording of can messages inside a bag file is mandatory. For this, the package ros_canopen was used. The commands needed to use were:

sudo ip link set can0 up type can bitrate 500000
rosrun socketcan_bridge socketcan_to_topic_node

the first to set up can, and the second to publish can messages to ROS. The topic published is /received_messages.

The script used to process the data is can_ros_msgs_to_ackermann.py, in which the can messages are subscribed and the ackermann messages are published.

manuelgitgomes commented 2 years ago

Next step is to add this to the bringup and record_data launch files

miguelriemoliveira commented 2 years ago

the first to set up can, and the second to publish can messages to ROS. The topic published is /received_messages.

Hi @manuelgitgomes ,

perhaps you could rename to /can/received_messages , or even better, /atlascar2/can_messages, not to be so generic

The script used to process the data is can_ros_msgs_to_ackermann.py, in which the can messages are subscribed and the ackermann messages are published.

But this one is not running when collecting the bag file, right?

manuelgitgomes commented 2 years ago

Hello!

perhaps you could rename to /can/received_messages , or even better, /atlascar2/can_messages, not to be so generic

Sure, it's just a remap. Will do that.

But this one is not running when collecting the bag file, right?

It's up to the user!

miguelriemoliveira commented 2 years ago

OK, but it is important to not record the output of the ackerman node in the bag file, because we want to play the bag and run the ackeman node with different configs later.