ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

There is probably existing software meant for autonomous cars rather than than rail vehicles, but that model streets as series of waypoints (with many branches at every intersection and extra allowances for lane switching). They could probably be shoehorned for this purpose but I suspect they are complex to get up and running and contain a lot of unwanted code that is hard to separate out from just the street/rail part. Duckietown may be more user friendly than Autoware, for example?

You could put together something simple in a python node that subscribes to a velocity and publishes a tf and messages with the track in them that allow visualization in rviz. The simplest starting point is a track with no branches/switches, so the node could have an array of key point locations (ideally it would have a subscription or a service to add the locations or an entire track in one message, possibly involving a custom message).

Another simplification would be to have straight lines between key points, later that could be replaced with splines for gentle curves.

The position of the rail vehicle is a tf (multiple segments in a train could be added later), which could have a complex 3D model hanging off it in rviz, or a simple Marker cube.

The velocity message could be a regular float, and inside an update loop in your node you would integrate the velocity every update step and track where between two keypoints the vehicle is, and if to advance it to the next set of keypoints once it has moved past one.

The track visualization could be an rviz Marker of type line strip, or a Path.

Integration with a full up simulator like Gazebo could be added later, maybe the position of the vehicle would be set directly every time step from the tf output by this node.

There is probably existing software meant for autonomous cars rather than than rail vehicles, but that model streets as series of waypoints that could also represent rails (with many branches at every intersection and extra allowances for lane switching). They could probably be shoehorned for this purpose but I suspect they are complex to get up and running and contain a lot of unwanted code that is hard to separate out from just the street/rail part. Duckietown may be more user friendly than Autoware, for example?

You could put together something simple in a python node that subscribes to a velocity and publishes a tf and messages with the track in them that allow visualization in rviz. The simplest starting point is a track with no branches/switches, so the node could have an array of key point locations (ideally it would have a subscription or a service to add the locations or an entire track in one message, possibly involving a custom message).

Another simplification would be to have straight lines between key points, later that could be replaced with splines for gentle curves.

The position of the rail vehicle is a tf (multiple segments in a train could be added later), which could have a complex 3D model hanging off it in rviz, or a simple Marker cube.

The velocity message could be a regular float, and inside an update loop in your node you would integrate the velocity every update step and track where between two keypoints the vehicle is, and if to advance it to the next set of keypoints once it has moved past one.

The track visualization could be an rviz Marker of type line strip, or a Path.

Integration with a full up simulator like Gazebo could be added later, maybe the position of the vehicle would be set directly every time step from the tf output by this node.

There is probably existing software meant for autonomous cars rather than rail vehicles, but that model streets as series of waypoints that could also represent rails (with many branches at every intersection and extra allowances for lane switching). They could probably be shoehorned for this purpose but I suspect they are complex to get up and running and contain a lot of unwanted code that is hard to separate out from just the street/rail part. Duckietown may be more user friendly than Autoware, for example?

You could put together something simple in a python node that subscribes to a velocity and publishes a tf and messages with the track in them that allow visualization in rviz. The simplest starting point is a track with no branches/switches, so the node could have an array of key point locations (ideally it would have a subscription or a service to add the locations or an entire track in one message, possibly involving a custom message).

Another simplification would be to have straight lines between key points, later that could be replaced with splines for gentle curves.

The position of the rail vehicle is a tf (multiple segments in a train could be added later), which could have a complex 3D model hanging off it in rviz, or a simple Marker cube.

The velocity message could be a regular float, and inside an update loop in your node you would integrate the velocity every update step and track where between two keypoints the vehicle is, and if to advance it to the next set of keypoints once it has moved past one.

The track visualization could be an rviz Marker of type line strip, or a Path.

Integration with a full up simulator like Gazebo could be added later, maybe the position of the vehicle would be set directly every time step from the tf output by from this node.

node (though that may not play nice physically with a regular simulated objected that it collides with).

There is probably existing software meant for autonomous cars rather than rail vehicles, but that model streets as series of waypoints that could also represent rails (with many branches at every intersection and extra allowances for lane switching). They could probably be shoehorned for this purpose but I suspect they are complex to get up and running and contain a lot of unwanted code that is hard to separate out from just the street/rail part. Duckietown may be more user friendly than Autoware, for example?

You could put together something simple in a python node that subscribes to a velocity and publishes a tf and messages with the track in them that allow visualization in rviz. The simplest starting point is a track with no branches/switches, so the node could have an array of key point locations (ideally it would have a subscription or a service to add the locations or an entire track in one message, possibly involving a custom message).

Another simplification would be to have straight lines between key points, later that could be replaced with splines for gentle curves.

The position of the rail vehicle is a tf (multiple segments in a train could be added later), which could have a complex 3D model hanging off it in rviz, or a simple Marker cube.

The velocity message could be a regular float, and inside an update loop in your node you would integrate the velocity every update step and track where between two keypoints the vehicle is, and if to advance it to the next set of keypoints once it has moved past one.

The track visualization could be an rviz Marker of type line strip, or a Path.

Integration with a full up heavy weight simulator like Gazebo could be added later, maybe the position of the vehicle would be set directly every time step from the tf output from this node (though that may not play nice physically with a regular simulated objected that it collides with).